Waiting List
There are no players on the waiting list yet. Only Windows users can play this game. If you have an emulator, you can join the waiting list to be informed when a new server is ready to play.
[Login to join waiting list]
| A library which sorts lists |
Version 3 ·
Date Added: 5/20/05
If you wish to download this library for your Linux/Mac installation, enter the following on your command line:
DreamDownload byond://Theodis.QuickSort##version=3
Emulator users, in the BYOND pager go to File | Open Location and enter this URL:
byond://Theodis.QuickSort##version=3
|
| |
Desc:
Sorts a list of items using the quick sort algorithm.
Updates:
Version 3 - 1/14/2009
Fixed a bug in InsertSort should improve speed slightly as well as
handle sorting subsets properly.
Version 2
Tweaked the logic for the cutoff point to check before partitioning
rather than after. Might have been the source of bugs with lists
smaller than 2. Plus it looks cleaner.
Usage
QuickSort(L[], cmp, start = 1, end = L.len)
L - The list to be sorted
cmp - The comparision function to be used to compare elements in the list
start - The start of the region in the list to be sorted
end - The end of the region in the list to be sorted
The comparision function should take two parameters. The parameters
are the two items being compared. This function should return a negative
number if the first item is less than the second, 0 if the items have
an equal weight for the sorting, and positive if the first item is
larger than the second.
Login to post a comment.