4 ms·
Even though it is one of the first things a Computer Scientist learns, quicksort is still one of the most beautiful algorithms ever. It's quirky in the sense t
by jchonphoenix 14y ago
Even though it is one of the first things a Computer Scientist learns, quicksort is still one of the most beautiful algorithms ever.
It's quirky in the sense that it is a randomized algorithm. It's analysis is beautifully simple once understood, but painfully non-trivial. There are multiple ways to analyze the running time of quicksort (dartboard, recurrence, etc) and its ideas apply to many other algorithms.