Array
162. Find Peak Element
Find any peak — an element strictly greater than both neighbours, with the out-of-bounds edges treated as −∞ — in O(log n). That the target is logarithmic despite the array being completely unsorted…
Loading…
Find any peak — an element strictly greater than both neighbours, with the out-of-bounds edges treated as −∞ — in O(log n). That the target is logarithmic despite the array being completely unsorted…
Loading…