Determine whether a number is present in a rotated sorted array.
Unlock detailed company stats for this questionUpgrade
Given a sorted array (e.g. 1 2 3 4 5 6 7) that has been transposed, i.e. some numbers removed from one end and attached to the other (e.g. 6 7 1 2 3 4 5), write a function to determine whether a given number is present. Examples: for 6 7 1 2 3 4 5, finding 1 returns true and finding 4 returns true.
Format · Technical interview.
Community answers
No answers contributed by the community yet.
Related questions
Determine whether an element is present in a matrix whose rows and columns are all sorted.Given an integer array nums where nums[i] is the parent of index i, determine whether it represents a valid tree.Find the number of rotations in a circularly sorted array.Related courses

Course

Course
Course
