Question bank › Binary Search
Dsa Binary Search Medium

Find Rotation Point in Sorted Array

You are given a rotated sorted array (an array that has been rotated at some pivot index). Your task is to find the index of the rotation point where the sorted order changes. If the array is [4, 5, 6, 7, 0, 1, 2, 3], the rotation point is at index 4 (the value 0). If there's no rotation, return -1. Input Format: - The first line contains an integer n (1 ≤ n ≤ 1000), the number of elements in the array. - The second line contains n space-separated integers representing the array elements. Output Format: - A single integer representing the index of the rotation point or -1 if not found. Example: Input: 8 4 5 6 7 0 1 2 3 Output: 4

Key concepts

binary_searcharraysearching

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.