Anonymous user
Sorting algorithms/Bubble sort: Difference between revisions
More pythonic
(→[[Toka]]: Updated to work with Toka R1) |
(More pythonic) |
||
Line 310:
==[[Python]]==
[[Category:Python]]
<pre>
while 1:
for j in range(len(seq) - i):▼
changed =
for i in
seq[i], seq[i+1] = seq[i+1], seq[i]
changed = 1
if not changed:
break
</pre>
==[[Ruby]]==
|