Just check when the array decreases instead of increasing (as it is sorted) , and if that doesnt happen , rotation is 0 , so return the first element as min :)

assumption : there is at least 1 element in array . ( we can put a simple length check for this is needed)

assum

```
public int findMin(int[] nums) {
for(int i = 1; i < nums.length; i++){
if(nums[i] < nums[i-1]){
return nums[i];
}
}
return nums[0];
}
```