STL的二分查找binary_search
摘要:一、判断值是否存在: binary_search()bool binary_search(ForwardIterator first, ForwardIterator last, const LessThanComparable& value); bool binary_search(ForwardIterator first, ForwardIteratorlast, const T& value, StrictWeakOrdering comp); 在[first,last)中查找value,如果找到返回Ture,否则返回False 二分检索,复杂度O(log(last-f
阅读全文
posted @
2012-07-24 09:48
cchun
阅读(3025)
推荐(0)