[ProgSoc] Multi-index sorting algorithms

James Ducker jducker at it.uts.edu.au
Tue Dec 21 12:38:13 EST 2010


Putting aside some silly errors in the code I linked, this is an
interesting problem, though I think I'm onto a solution, which I may
post later on. Input still encouraged though :)

- James


On 21 December 2010 11:57, James Ducker <jducker at it.uts.edu.au> wrote:
>
> Hey all,
> I'm trying to write a sorting algorithm that can sort a set of data
> (the usual, lowest to highest, A-Z, etc), but when it encounters a tie
> condition between two values, will defer sorting to another set of
> data, which I call the "tiebreaker" set. I'm having a diddly of a
> pickle getting it to sort reliably (recursive quicksorting wasn't
> working, bubblesorting is working /sort-of/, in that values tend
> toward the correct position, but are usually off by one or two slots).
>
> Anyway, does anyone know of some good multi-index sorting algorithms?
>
> - James
>
> PS: Here's a link to the current iteration of my code. It's
> JavaScript, /fairly/ legible though.
>
> http://progsoc.pastebin.com/DeZ3Hbnh
>
> Also, original, less-concise, quicksort-based attempt:
> http://progsoc.pastebin.com/GurMaRYb
>
> --
> James Ducker
> Web Developer
> http://www.studioj.net.au



--
James Ducker
Web Developer
http://www.studioj.net.au



More information about the Progsoc mailing list