Originally posted by: DaveSimmons
yep, that should work fine, though I like my way better -- only 4 "if" and 1 "while" 🙂
yours is the next-best way to do it, and reducing the unsorted set size by one each time was a good approach (done any recursion before?)
mine works with 3 'if' and a while, unless that was a typo
edit: Text
I don't acutally have to hand this in, just do an algorithm for it.