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 |
Re:这不叫O(n)...明明是N方,只不过一般没有最坏情况而已。。In Reply To:这不叫O(n)...明明是N方,只不过一般没有最坏情况而已。。 Posted by:winL at 2011-08-26 15:54:34 排序以后,第一次确定2个指针位置,后面就是2个指针慢慢往中间某个位置靠,所以复杂度就是两个指针移动的距离刚好是n,均摊o(n)比二分快哦,亲 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator