![SPOJ #500. Turbo Sort SPOJ #500. Turbo Sort](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
Sorting is not an out-dated topic. My own in-place qsort got TLE... so, I simply called stl::sort() to get AC.
This thread explains everything: http://*.com/questions/5038895/does-stdsort-implement-quicksort Basic qsort has a worst case of O(n^2) and could result in too deep stack. The latest MinGW uses IntroSort\InsertionSort. And Python 2.3+ uses TimSort
To learn these in depth...