Simple C++ solution beats 100% (cartoon included :)
There are a lot of binary search solutions. However, I found that a simple linear search solution seems to be just as fast for the given test cases. Logic is as
There are a lot of binary search solutions. However, I found that a simple linear search solution seems to be just as fast for the given test cases. Logic is as follows:\n\n![image](https://s3-lc-upload.s3.amazonaws.com/users/hckrtst/image_1532817694.png)\n\n\nCode below:\n\n```cpp\nint findMin(vector<int>& nums) {\n    int min = nums[0];\n    for (int i = 0; i < nums.size(); i++) {\n        if ((i < nums.size() - 1) &&\n            nums[i] > nums[i+1]) {\n                min = nums[i+1];\n                break;\n            }  \n    }\n    return min;        \n}\n\n```
[]