- 博客(2)
- 资源 (1)
- 收藏
- 关注
原创 《算法导论》课后习题 9.1-1
1. 原题 Show that the second smallest of n elements can be found with n + lg n − 2 comparisons in the worst case. (Hint: Also find the smallest element.) 2. 思路 2.1 利用最小堆 1)首先建立一个最小堆,需要 O(N)时间
2012-10-16 17:59:47 974
原创 对于 std::vector<T> , 当T没有赋值运算符函数的时候,如何调用vector push_back?
这个问题是在stackoverflow发现的: http://stackoverflow.com/questions/12908398/can-placement-new-and-vectordata-be-used-to-replace-elements-in-a-vector 我是对讨论做一个整理,如下。 1.代码片段 #include 2 #include 3
2012-10-16 14:48:41 4914 1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人