Faster Than 100% users C++ time O(logn) space O(1)
I have just have used simple binary search with a little bit of modification as I have checked last element with the mid one so that I can swap change left righ
I have just have used simple binary search with a little bit of modification as I have checked last element with the mid one so that I can swap change left right accordingly.  \n\t  \n\t  \n\t  int findMin(vector<int>& nums) {\n        int left=0,right=nums.size()-1;\n        while(left<right)\n        {\n            int mid = (left+right)/2;\n            if(nums[mid]<nums[mid+1])\n            {\n                if(nums[mid]>nums[right])\n                {\n                    left=mid+1;\n                }\n                else\n                    right=mid;\n            }\n            else\n                left=mid+1;\n        }\n        return nums[left];\n    }
[]