Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
理论与实践没有很好结合的结果,看来党的保先是很有必要的~~~~In Reply To:qsort 为什么又不会超呢?费解。O(n^2)啊 Posted by:Judas at 2005-10-02 14:36:19 归并排序虽然是o(nlogn),但是因为频繁作数据读写操作(归并的时候把一半的数据 写到buffer中去),所以速度是很慢的,远慢于同样是o(nlongn)的堆排序。而qsort 只不过是最坏情况是o(n^2),平均起来却是最快的,要不怎么叫快速排序?兄弟一定 没学过数据结构吧? Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator