dsa11 min read
Find Peak Element — Binary Search on Slope [LC 162, Google, Amazon]
Find any peak element in O(log n) by always moving toward the uphill neighbor. Understand the slope-chasing invariant that guarantees a peak exists in every search window.
Read →