Easy C++ binary search solution
\nclass Solution {\npublic:\n    int findMin(vector<int>& nums) {\n        int n = nums.size();\n        int left = 0, right = n-1;\n        if(nums[right] > nu
```\nclass Solution {\npublic:\n    int findMin(vector<int>& nums) {\n        int n = nums.size();\n        int left = 0, right = n-1;\n        if(nums[right] > nums[left]) return nums[left];\n        while(left < right){\n            int mid = left + (right-left)/2;\n            if(nums[mid] < nums[right]) right=mid;\n            else left = mid+1;\n        }\n        return nums[left];\n    }\n};\n```\n**Time complexity:** O(logN) where N is the size of array.\n**Space complexity:** O(1)\n**Questions/ Discussions are welcome.**
['Binary Search', 'C']