Sorting list...
Monkey Forums/Monkey Programming/Sorting list...
| ||
| How can sort the content of list? I can't find any Sort() command or equivalent. |
| ||
| Looks like we'll have to write one ourselves... So whats your fav sort rountine? Bubble, quick? :P |
| ||
I think a Map will naturally keep it's keys sorted in a binary tree:
Function Main()
Local map:=New StringMap<Object>()
map.Set("C",Null)
map.Set("B",Null)
map.Set("A",Null)
For Local a:=Eachin map.Keys
Print a
Next
End
bit overkill compared to an official SortedList... |
| ||
| Doesn't like every native language have a built-in qsort() function? At least C/C++ does. Those might be faster and more optimized than a quicksort functio written in Monkey. |