Sorting algorithms/Bubble sort: Difference between revisions

Content added Content deleted
(Initial Kotlin implementation)
(→‎{{header|Kotlin}}: Remove redundant initialisation)
Line 1,546: Line 1,546:


<lang kotlin>fun <T> bubbleSort(a : Array<T>, c: Comparator<T>) {
<lang kotlin>fun <T> bubbleSort(a : Array<T>, c: Comparator<T>) {
var changed = false
var changed : Boolean
do {
do {
changed = false
changed = false