A BubbleSort algorithm
This sort works by iterating through the list of values from the start
comparing each pair of values and swapping them if they are in the wrong order
array
(*[]): the input array[comparator]
(Function): a function to compare2
values *(defaults asc->desc)*[step]
(Function): an optional function that gets applied at each step
(*): the sorted array