/ruby-bubble-sort

The project built a method #bubble_sort that takes an array of numbers and returns a sorted array, as well as a method #bubble_sort_by that takes an array of strings and sorts it by string length.

Primary LanguageRubyMIT LicenseMIT

Ruby Bubble Sort

In this project, I built a simple Bubble sort algorithm using Ruby

screenshot screenshot

The project built a method #bubble_sort that takes an array of numbers and returns a sorted array, as well as a method #bubble_sort_by that takes an array of strings and a block and uses yield to read the block and return an array of strings sorted by the length of the strings.

Built With

  • Ruby

Live Demo

Live Demo

Author

👤 Chi A. Joel

Acknowledgments

Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

License

This project is MIT licensed.