Tony's Log

Algorithms, Distributed System, Machine Learning

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

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://stackoverflow.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...

posted on 2014-02-09 16:37  Tonix  阅读(165)  评论(0编辑  收藏  举报