2 ms·
It is implemented in C but it doesn't sort small structs without any pointer dereference. That quicksort have n^2 worst case scenario doesn't matter in practice
by bluecalm 12y ago
It is implemented in C but it doesn't sort small structs without any pointer dereference. That quicksort have n^2 worst case scenario doesn't matter in practice at all. First you can make it nlogn (by either running heapsort at some point or taking median out of 3-5 random elements instead of once at predermined positions).