Jump to content

Sorting algorithms/Gnome sort: Difference between revisions

m
→‎Icon and Unicon: header simplification
m (→‎Icon and Unicon: header simplification)
Line 552:
lst gnomeSortInPlace println # ==> list(-4, -1, 2, 5, 9)</lang>
 
== {{header|Icon}} and {{header|Unicon }}==
==={{header|Icon}}===
<lang Icon>procedure main() #: demonstrate various ways to sort a list and string
demosort(gnomesort,[3, 14, 1, 5, 9, 2, 6, 3],"qwerty")
Line 582 ⟶ 581:
on string : "qwerty"
with op = &null: "eqrtwy" (0 ms)</pre>
 
==={{header|Unicon}}===
The Icon solution works in Unicon.
 
=={{header|J}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.