2007年2月8日

摘要: MergeSort, I didnot use median of 3 method to choose pivot, instead, I use center = (left + right)/2 as a pivot to partition the array. Note, when left + CUTOFF = right, which means there is only CUTOFF(5) elements in the subarray. Then we do not continue the MergeSort, we change to use insertion sort since it is more efficient than MergeSort when we have a small array. 阅读全文

posted @ 2007-02-08 10:42 QT_pixy 阅读(584) 评论(0) 推荐(0)

摘要: Implement the deque(double-ended queue) ADT using a doubly linked list 阅读全文

posted @ 2007-02-08 03:16 QT_pixy 阅读(4210) 评论(0) 推荐(0)


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3