Sorting algorithms/Bogosort: Difference between revisions
Content added Content deleted
(Nimrod -> Nim) |
|||
Line 542: | Line 542: | ||
io.put_string ("Unsorted: ") |
io.put_string ("Unsorted: ") |
||
across test as t loop io.put_string (t.item.out + " ") end |
across test as t loop io.put_string (t.item.out + " ") end |
||
create testresult.make_empty |
|||
create sorter |
create sorter |
||
test:= sorter.bogo_sort (test) |
|||
io.put_string ("%NSorted: ") |
io.put_string ("%NSorted: ") |
||
across |
across test as t loop io.put_string (t.item.out + " ") end |
||
end |
end |
||
test: ARRAY[INTEGER] |
test: ARRAY[INTEGER] |
||
testresult: ARRAY[INTEGER] |
|||
sorter: BOGO_SORT |
sorter: BOGO_SORT |
||
end |
end |