Anonymous user
Sorting algorithms/Bubble sort: Difference between revisions
m
fix tags
m (→{{header|Icon}}: note builtins) |
m (fix tags) |
||
Line 678:
This code will demonstrate the bubble sort using arguments supplied as arguments. The last sort call on a string rather than a list illustrates how many Icon operators work on different types. The example could be made more general to deal with coercion of types like cset to sting (admittedly an uninteresting example as csets are already sorted).
<
l1 := copy(l2) # list of strings
Line 711:
}
return
end</
Sample output:
|