Search a Rotated List

Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.

The problem

  • medium
  • Pro

A sorted list of distinct numbers has been rotated at an unknown point, so it might look like four, five, six, seven, zero, one, two. Find a target's position in logarithmic time, or return minus one. Explain how binary search still works.

Talk this problem through with an AI coach

This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.

Start free →