Problem 1095 · Hard

Find in Mountain Array

Binary search for the peak, then search the ascending and descending halves, returning the smallest matching index.

Open the interactive visualisation