/ruby-bubble-sort

bubblesort implemented in ruby, for theodinproject.com

Primary LanguageRuby

Project Ruby Advanced Building Blocks

Project 1: 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?).


Now create a similar method called #bubble_sort_by which sorts an array but accepts a block.
The block should take two arguments which represent the two elements currently being compared. 

Project 2: Enumerable Methods

You learned about the Enumerable module that gets mixed in to the Array and Hash classes (among others) 
and provides you with lots of handy iterator methods.
To prove that there's no magic to it, you're going to rebuild those methods.