```
public int findMin(int[] a) {
int low = 0, mid = 0;
int high = a.length - 1;
while(low <= high) {
mid = low + ((high - low)/2);
if(a[mid] < a[high]) {
high = mid;
}else if(a[mid] > a[high]) {
low = mid+1;
}else {
return a[mid];
}
}
return a[mid];
}
```