|View source on GitHub|
Bubble Sort algorithm to arrange a list so that the lowest value is
fqe.util.bubblesort( arr: List[Any] ) -> int
stored in 0 and the highest value is stored in len(arr)-1. It is included here in order to access the swap count.
|arr (list) - object to be sorted|
|arr (list) - sorted swap_count (int) - number of permutations to achieve the sort|