bubbleSort

Worst complexity: n^2 Average complexity: n^2 Best complexity: n Space complexity: 1 Method: Exchanging Stable: Yes


fun <T : Comparable<T>> MutableList<T>.bubbleSort(showPasses: Boolean = false)