C++ binary search sol
\n      \n       int findMin(vector<int>& nums) {\n        \n        int l = 0,r=nums.size()-1,n=nums.size();\n        int mid,prev,next;\n        \n        whi
```\n      \n       int findMin(vector<int>& nums) {\n        \n        int l = 0,r=nums.size()-1,n=nums.size();\n        int mid,prev,next;\n        \n        while(l<=r){\n            \n            mid = l + (r-l)/2;\n            prev = (mid + n - 1)%n;\n            next = (mid+1)%n;\n            \n            if(nums[mid]<=nums[prev] && nums[mid]<=nums[next])\n                return nums[mid];\n            else if(nums[mid]>nums[r])\n                l = mid+1;\n            else\n                r = mid-1;\n        }\n        return -1;\n    }\n```
['Binary Search', 'C']