Using Binary Search, Simple & Easy to Understand, [C++]
Implementation\n\nTime Complexity: O(LogN)\nSpace Complexity: O(1)\n\nclass Solution {\npublic:\n    int findMin(vector<int>& nums) {\n        int left = 0, rig
Implementation\n\n**Time Complexity: O(LogN)\nSpace Complexity: O(1)**\n```\nclass Solution {\npublic:\n    int findMin(vector<int>& nums) {\n        int left = 0, right = nums.size()-1, minVal = INT_MAX;\n        \n        while(left <= right){\n            int mid = left + (right - left)/2;\n            \n            if(nums[left] <= nums[mid]){\n                minVal = min(minVal, nums[left]);\n                left = mid+1;\n            }\n            else{\n                minVal = min(minVal, nums[mid]);\n                right = mid-1;\n            }\n        }\n        \n        return minVal;\n    }\n};\n```\nIf you find any issue in understanding the solution then comment below, will try to help you.\nIf you found my solution useful.\nSo **please do upvote and encourage me** to document all leetcode problems\uD83D\uDE03\nHappy Coding :)
['Binary Search', 'C']