Given an array that was sorted in ascending order and then rotated, possibly containing duplicates, return the minimum element. Input: an array of integers.
Input: An array of integers.
Output: Integer — the minimum element.
Input: [2,2,2,0,1]
Output: 0
Explanation: Minimum is 0.Input: [1,3,5]
Output: 1
Explanation: Not rotated; min is 1.Input: [3,1,3]
Output: 1
Explanation: Minimum is 1.1<=n<=5000-10^4<=value<=10^4rotated, may contain duplicates