BubbleSort

Bubble Sort.

Repeatedly swaps adjacent elements if they are in the wrong order.

Functions

Link copied to clipboard
fun <T : Comparable<T>> sort(array: Array<T>)

Sorts the array in ascending natural order.

fun <T> sort(array: Array<T>, comparator: Comparator<T>)