Sorting algorithms/Bubble sort: Difference between revisions

Line 5,168:
 
=={{header|Swift}}==
<lang Swift>func bubbleSort<T:Comparable>(inout list:inout [T]) {
var done = false
while !done {
Line 5,179:
}
}
}
}</lang>
 
var list1 = [3, 1, 7, 5, 2, 8, 4]
print(list1)
bubbleSort(list: &list1)
print(list1)</lang>
 
=={{header|TI-83 BASIC}}==
Anonymous user