import java.util.Arrays;

public class FindMinimumInRotatedSortedArray {

    public int findMin(int[] nums) {
        int min = nums[0];

        for (int i = 1; i < nums.length; i++) {
            if (nums[i] < min) min = nums[i];
        }
        return min;
    }

    public static void main(String[] args) {
        int[] nums = new int[] {4, 5, 6, 7, 0, 1, 2};
        System.out.println(Arrays.toString(nums));

        FindMinimumInRotatedSortedArray solution = new FindMinimumInRotatedSortedArray();
        System.out.println(solution.findMin(nums));
    }
}
@@ -100,24 +100,365 @@
 t%5B%5D nums) %7B%0A
+        int left = 0, right = nums.length - 1;%0A        while (left %3C right) %7B%0A            int mid = (left + right) / 2;%0A            if (nums%5Bmid%5D %3E nums%5Bright%5D) %7B%0A                left = mid + 1;%0A            %7D else %7B%0A                right = mid;%0A            %7D%0A        %7D%0A        return nums%5Bleft%5D;%0A    %7D%0A%0A    public int findMin1(int%5B%5D nums) %7B%0A
         int 

update solution