链接:https://leetcode-cn.com/problems/first-bad-version/
class Solution {
public int[] twoSum(int[] numbers, int target) {
//夹逼思想
int low =0;
int hight =numbers.length-1;
while(low<hight){
// int mid =(hight+low)/2;
if(numbers[low]+numbers[hight]==target){
return new int [] {low+1,hight+1};
}
if(numbers[low]+numbers[hight]<target){
low++;
}
else{
hight--;
}
}
return null;
}
}