Find a Peak Element
Medium
Binary Search Applications
A peak is an element strictly greater than its neighbours (outside the array counts as negative infinity). Print the index of any peak; the sample has a unique one.
Constraints
1 <= n <= 1000
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.