摘要:
lower_boundlower_bound(begin, end, target)用来查找一个已排序的序列中[begin, end)第一个大于等于target的元素index。数组A如下:value: 1, 2, 2, 3, 4, 5, 5, 6, 7index: 0, 1, 2, 3, 4, 5... 阅读全文
摘要:
class Solution {public: int findMin(vector &num) { int L = 0, R = num.size() - 1; while (L = num[R]) { int mid= (L+R)/2; ... 阅读全文