An open API service indexing awesome lists of open source software.

https://github.com/lucas4tech/ruby-bubble-sort-example

Construct a method takes an array and returns a sorted array using Ruby 🎯
https://github.com/lucas4tech/ruby-bubble-sort-example

challenge deisgn-pattern hackathon logic-programming ruby

Last synced: 9 months ago
JSON representation

Construct a method takes an array and returns a sorted array using Ruby 🎯

Awesome Lists containing this project

README

          

# Bubble Sort

Build a method #bubble_sort that takes an array and returns a sorted array. It must use the bubble sort methodology (using #sort would be pretty pointless, wouldn’t it?).

```
bubble_sort([4,3,78,2,0,2])
=> [0,2,2,3,4,78]
```