GoLang Solution For LeetCode Problem: Search in Rotated Sorted Array
Solving Search in Rotated Sorted Array in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.
You may assume no duplicate exists in the array.
Input: nums = [4,5,6,7,0,1,2], target = 0 Output: 4
Input: nums = [4,5,6,7,0,1,2], target = 3 Output: -1
See the full details of the problem Search in Rotated Sorted Array at LeetCode
Originally posted at: @github.com/halfrost/LeetCode-Go