What is bubble sort?
a simple sorting algorithm that repeatedly steps through an array, compares adjacent elements and swaps them if they are in the wrong order.
how do you swap elements in an array?
array = [“a”, “b”, “c”, “d”] # let’s swap “a” and “b”
array[0], array[1] = array[1], array[0]
p array # => [“b”, “a”, “c”, “d”]
How do you implement bubble sort?
