Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # BUBBLESORT
- #
- # Sorts an array by value from smaller to bigger.
- #
- # array - The array to be sorted.
- #
- # Examples
- #
- # bubblesort([1, 4, 7, 6, 1])
- # # => [1, 1, 4, 7, 6, 1]
- #
- # bubblesort([1, 3, 91, 51, 108])
- # # => [1, 3, 51, 91, 108]
- #
- # Returns the sorted array
Advertisement
Add Comment
Please, Sign In to add comment