```
public int findMin(int[] num) {
int l = 0, r = num.length - 1;
while (r - l > 1) {
int mid = l + (r - l) / 2;
if (num[mid] > num[l] && num[mid] > num[r]) {
l = mid;
} else {
r = mid;
}
}
return Math.min(num[l], num[r]);
}
```

The point is, the middle element must be wither smaller than both the start and end or bigger than both of them if it is rotated.

Or, if it is not rotated, just do the basic binary search.