Question bank › Binary Search
Dsa Binary Search Easy

Mountain Peak Identifier

You are given a list of integers representing the heights of mountains, where the list is strictly increasing and then strictly decreasing. Your task is to identify the peak height (the highest point in the list). Determine and print this peak height. Input: The first line contains an integer n (3 <= n <= 1000), the number of mountains. The next n lines contain the height of each mountain. Output: Print the peak height. Example: Input: 5 1 3 8 5 2 Output: 8

Key concepts

binary_searcharrayssearching

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.