Solving Find Minimum in Rotated Sorted Array II in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.

Problem Description

Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.

Find the minimum element.

The array may contain duplicates.

Example 1:

Input: [1,3,5]
Output: 1

Example 2:

Input: [2,2,2,0,1]
Output: 0

Note:

  • Would allow duplicates affect the run-time complexity? How and why?

See the full details of the problem Find Minimum in Rotated Sorted Array II at LeetCode

Originally posted at: @github.com/halfrost/LeetCode-Go