Problem 852 · Medium

Peak Index in a Mountain Array

Locate the single peak in an array that rises and then falls. The visual narrows a binary search by comparing a middle value with its right neighbour.

Open the interactive visualisation