Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 243 Bytes

File metadata and controls

8 lines (6 loc) · 243 Bytes

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]