Updated binary search 😊
\n\n# Approach\nIf nums[mid] > nums[right], it means the pivot (the point of rotation) is on the right side. The minimum element is on the right side of the arr
\n\n# Approach\nIf nums[mid] > nums[right], it means the pivot (the point of rotation) is on the right side. The minimum element is on the right side of the array. So, update left = mid + 1.\n\n If nums[mid] <= nums[right], it means the pivot is on the left side, or mid itself might be the minimum element. So, update right = mid.\n\n**Bold**\n# Complexity\n- Time complexity:\nO(log n)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution {\n    public int findMin(int[] nums) {\n        int l=0, r = nums.length -1 ; // l - left,  r - right\n        int m; //mid\n        while(l < r){\n            m = l+(r-l)/2; //default mid\n            if(nums[m] > nums[r]){ \n                l = m+1;\n            }else{ \n                r = m;\n            }\n        }\n        return nums[l];\n    }\n}\n\n```\n![Vote please!.jpeg](https://assets.leetcode.com/users/images/2b94f2f4-bedb-4256-906c-78d5ef75daee_1708622547.7860172.jpeg)\n
['Java']