Sorting algorithms/Bubble sort: Difference between revisions

Content added Content deleted
(add Tcl)
(→‎{{header|Tcl}}: Added note about sorting)
Line 895: Line 895:


puts [bubblesort {8 6 4 2 1 3 5 7 9}] ;# => 1 2 3 4 5 6 7 8 9</lang>
puts [bubblesort {8 6 4 2 1 3 5 7 9}] ;# => 1 2 3 4 5 6 7 8 9</lang>

Idiomatic code uses the builtin <code>lsort</code> instead, which is a stable O(''n''log''n'') sort.


=={{header|Toka}}==
=={{header|Toka}}==