摘要:
二分查找 在闭区间查找[begin,end],注意对找不到的处理 int binary_find(vector<int>& nums, int target){ int l=0,r=nums.size()-1;//Notice while(l<r){ int mid=l+(r-l)>>1; if(n 阅读全文
摘要:
Description 题目 Farmer John has built a new long barn, with N (2 ⇐ N ⇐ 100,000) stalls. The stalls are located along a straight line at positions x1,.. 阅读全文