Guest User

Untitled

a guest
Jan 21st, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. # BUBBLESORT
  2. #
  3. # Sorts an array by value from smaller to bigger.
  4. #
  5. # array - The array to be sorted.
  6. #
  7. # Examples
  8. #
  9. # bubblesort([1, 4, 7, 6, 1])
  10. # # => [1, 1, 4, 7, 6, 1]
  11. #
  12. # bubblesort([1, 3, 91, 51, 108])
  13. # # => [1, 3, 51, 91, 108]
  14. #
  15. # Returns the sorted array
Advertisement
Add Comment
Please, Sign In to add comment