# Find Minimum in Rotated Sorted Array (Leetcode 153)

Problem Link: <https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/>

```python
class Solution:
    def findMin(self, nums: List[int]) -> int:
     
        def modifiedbsearch(nums,i,j):
            
            mid=(i+j)//2
            while(i<=j):
                if(nums[i]<=nums[j]):
                    return i
                
                # Case 1: If first part is sorted
                if(nums[i]<=nums[mid]):
                    return modifiedbsearch(nums,mid+1,j)
                
                # Case 2: Else
                else:
                    return modifiedbsearch(nums,i,mid)
                 
            
        n=len(nums)
        idx=modifiedbsearch(nums,0,n-1)
        return nums[idx]
```
