← Questions

Find a local minimum or peak with binary search

0
MetaCodingLast asked Aug 2026

A coding interview question asked in Meta's AI-enabled coding round, last asked Aug 2026. It tests binary-search and arrays.

Given a non-empty integer array, return the index of a local minimum: an element no larger than its neighbours, where positions outside the array count as infinitely large. Use a left-biased binary search so the answer is deterministic…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Meta · AI-enabled coding · Last asked Aug 202660 min · Several progressive tasks on a starter codebase in CoderPad with an AI assistant panel; usually two rounds · The first task usually without AI, later tasks with it

What it tests

binary-search · arrays

Your code and the AI tutor open when you unlock this question.