```
Note that we just need to identify where decreasing happens.
public class Solution {
public int findMin(int[] num) {
if(num.length==1)
return num[0];
else{
for(int i=1;i<num.length;i++){
if(num[i]<num[i-1])
return num[i];
}
return num[0];
}
}
}
```