There are many variations of quicksort. The Sedgewick's variation is probably the fastest. We probably won't go through it.
There are one good thing about the lecture. It puts a lot of stress on the partition function. So one thing I learnt, as it turns out the partition function actually doesn't always divide the array to halves. (!) It's a very good thing to know.
Time to implement quicksort once myself. It's something quite tricky to implement. Also want to take a look of the analysis of quicksort as well. Why the average case is nlogn?
No comments:
Post a Comment