A quite similar solution with the previous problem. only add more 1 or 3 lines to overcome the same elements.

public class Solution {

public int findMin(int[] num) {

int low = 0;

int high = num.length - 1;

int min = Integer.MAX_VALUE;

```
while (low <= high) {
int mid = low + (high - low)/2;
min = Math.min(min, num[mid]);
if (mid + 1 < num.length) {
min = Math.min(min, num[mid + 1]); // only this line differ with the other problem
}
if (num[high] < num[mid]) {
low = mid + 1;
} else {
high = mid - 1;
}
}
return min;
}
```

}