auto commit

This commit is contained in:
CyC2018
2018-04-01 13:30:50 +08:00
parent 556bcb5e9d
commit a3c521c50c
2 changed files with 8 additions and 10 deletions

View File

@ -104,8 +104,8 @@ public class ThreeSumFast {
int l = 0, h = nums.length - 1;
while (l <= h) {
int m = l + (h - l) / 2;
if (nums[m] == target) return m;
else if (nums[m] < target) h = m - 1;
if (target == nums[m]) return m;
else if (target > nums[m]) h = m - 1;
else l = m + 1;
}
return -1;