LeetCode 81. Search in Rotated Sorted Array II

二分搜索会有问题,因为数组中有重复的值

所以在判断时,如果nums[l] == nums[r] l+=1

你可能感兴趣的:(Leetcode刷题,java)