dsa1 min read
Find Peak Element — Binary Search on Slope
Find any peak element in O(log n) by always moving toward the uphill neighbor, which guarantees finding a peak.
Read →
webcoderspeed.com
1 articles
Find any peak element in O(log n) by always moving toward the uphill neighbor, which guarantees finding a peak.