Search
⌘K
Find Local Minima in an Array
Design an algorithm to find the local minima in a given array. The solution should efficiently handle large arrays and multiple queries, similar to finding peak elements.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early April, 2026
Meta
Senior
Late February, 2026
Meta
Mid-level
Early December, 2025
Meta
Mid-level
In a given array, you have to find the local minimum. (any local minimum). Local minimum is the element which is less than or equal to its neighbour and for the 0th and last index it should be less than or equal to its one neighbour. The ask is to solve it in O(log n) complexity.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.