Easiest Solution with Binary Search
\n public int findMin(int[] nums) {\n \n\t\t //taking start and end as first and last index \n\t\tint start =0,next,prev;\n       int end = nums.length -1;\n\t 
\n public int findMin(int[] nums) {\n \n\t\t //taking start and end as first and last index \n\t\tint start =0,next,prev;\n       int end = nums.length -1;\n\t   \n       //finding the length of nums array\n\t   int n =nums.length;\n\t\t\n        //This is where result stored\n\t\tint res =-1;\n       \n\t   while(start<=end)\n       {\n         //If the array is sorted then we just need to return the first index element that is minimum element\n\t\t if(nums[start]<=nums[end])\n           {\n               res = nums[start];\n               break;\n           }\n\t\t\t\n\t\t\n           int mid  = (start +end)/2;\n            \n\t\t\t//next and prev is for storing next index and previous index if suppose we are at i so it will be (i+1) and (i-1) \n\t\t\t\n           next  = (mid+1)%n;\n           prev = (mid-1+n)%n;\n           \n\t\t   //If our mid element is less than both prev and next element then the mid element is minimum element\n\t\t   \n           if((nums[mid]<=nums[prev])&&(nums[mid]<=nums[next]))\n           {\n               res = nums[mid];\n               break;\n           }\n         \n\t\t //If the first half array is already sorted then we will get minimum element in next half array\n           if(nums[start]<=nums[mid])\n               start =mid+1;\n            \n           else if(nums[mid]<=nums[end])\n               end =mid-1;\n               \n       }\n        return res;\n    }\n\t//**Please upvote me **
[]