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.
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.
Mid November, 2025
Meta
Senior
Given an array of integers (both positive and negative), determine if there is a local minima in the array. ( a local minima is defined as an element a[j] such that a[j-1]>=a[j]<=a[j+]. Only compare the right element if the index is 0 and left element if the index is n-1)
Late April, 2025
Meta
Mid-level
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.