You are given a sorted array of integers which is also rotated. How will you find the smallest element in the array?
When rotation is performed on a sorted array of integers, the first (for sorted in ascending order) / last (for sorted in descending order) element is no longer the smallest element on the rotated array.
Running time = \( O(logn) \). public static int FindMinInRotatedSortedArray(int[] array) { |