/Bubble-Sort-Project

Bubble Sort Project

Primary LanguageRuby

Bubble-Sort-Project

In this project, we implemented the bubble sort algorithm using Ruby language. Assignment is focused on the use of yield and passing a block to a method.

  • #bubble_sort_by which sorts an array by accepting a block. The block will have two arguments that represent the two elements of the array that are currently being compared. If the result of the block execution is negative, the element on the left is “smaller” than the element on the right. 0 means both elements are equal. A positive result means the left element is greater. Use the block’s return value to sort your array.

Built With

  • Ruby

Live Demo

Live Demo Link

Getting Started

To get a local copy of the repository please run the following commands on your terminal:

$ cd $ git clone https://github.com/MahmoudBakr23/Bubble-Sort-Project.git

Authors

👤 Mahmoud

👤 Nusret

�� Contributing

Contributions, issues and feature requests are welcome!

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Microverse
  • The Odin Project