Re: Arranging the keys problem



Sc0rpi0 wrote:
) OMG ;) and you wonder why that interviewer did not liked your algs. ;) ?

You're confusing me with someone else. And you're missing the point.

) Just "sorting by counting". If we have definied set of extacly know
) elements, there is: R,W,B. so even if given in totally random order
) just one pass counting how many was W,R and B. Then write that many
) to the table. RRRRRRWWWBBBBBBBBBBBBBBB - sorted.

That's very nice, but his professor obviously wanted the Dutch National
Flag algorithm. Which happens to be the partitioning algorithm in
Quicksort. The class is leading up to Quicksort anyway, so I thought
I'd cut the corner.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
.