Search in Rotated Sorted Array

Try to solve the Search in Rotated Sorted Array problem.

Statement

Given a sorted integer array, nums, and an integer value, target, the array is rotated by some arbitrary number. Search and return the index of target in this array. If the target does not exist, return -1.

An original sorted array before rotation is given below:

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy