@@ -0,0 +1,861 @@
+package problems;%0A%0Apublic class FindMinInRotatedSortedArray %7B%0A    public int findMin(int%5B%5D num) %7B%0A        if (num == null %7C%7C num.length == 0)%0A            return 0;%0A%0A        return findMinHelper(num, 0, num.length - 1);%0A    %7D%0A%0A    int findMinHelper(int%5B%5D A, int l, int r) %7B%0A        if (r - l %3C= 1)%0A            return Math.min(A%5Bl%5D, A%5Br%5D);%0A%0A        int mid = (l + r) / 2;%0A        if (A%5Bmid%5D %3E= A%5Bl%5D && A%5Bmid%5D %3E A%5Br%5D)%0A            return findMinHelper(A, mid, r);%0A        if (A%5Bmid%5D == A%5Bl%5D && A%5Bmid%5D == A%5Br%5D)%0A            return Math.min(findMinHelper(A, mid, r), findMinHelper(A, l, mid - 1));%0A        return findMinHelper(A, l, mid);%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        FindMinInRotatedSortedArray fm = new FindMinInRotatedSortedArray();%0A        int%5B%5D num = %7B 4, 5, 6, 7, 0, 1, 2, 2 %7D;%0A        System.out.println(fm.findMin(num));%0A    %7D%0A%7D%0A

Add Find Minimum in Rotated Sortes Array