STL中的二分查找法--算法--笔记

二分查找 binary_search lower_bound upper_bound low_bound,upper_bound binary_search 用binary_search进行二分法查找(用法一) 方法:binary_search(数组名+n1,数组名+n2,值); 注:ios 1:n1和n2都是int类型的表达式,能够包含变量,若是n1=0,则+n1能够不写 查找区间为下标范围为[
相关文章
相关标签/搜索