View source on GitHub |
Bubble Sort algorithm to arrange a list so that the lowest value is
fqe.util.reverse_bubble_list(
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.
Args | |
---|---|
arr (list) - object to be sorted |
Returns | |
---|---|
arr (list) - sorted swap_count (int) - number of permutations to achieve the sort |