0 ms 🔥 simple 6 lines C++ code -- beats 100%
\u2764\uFE0FUPVOTE!\n# Complexity\n- Time complexity: O(LogN)\n\n- Space complexity: O(1)\n\n# Code\n\nclass Solution {\npublic:\n    int findMin(vector<int>& n
**\u2764\uFE0FUPVOTE!**\n# Complexity\n- Time complexity: O(LogN)\n\n- Space complexity: O(1)\n\n# Code\n```\nclass Solution {\npublic:\n    int findMin(vector<int>& nums) {\n        int start = 0,end = nums.size()-1; \n        while(start<end)\n        { \n            int mid = (start + end)/2;\n            if(nums[mid]>nums[end]) start = mid+1; \n            else end = mid; \n        } \n        return nums[start];\n    }\n};\n```
['C++']