โ† Intuit questions

First and last occurrences of x

Filed under Intuit

Given a sorted array of integers with potential duplicate elements, find the starting and ending indices of a given target element x. Return [-1, -1] if x is not found.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Intuit questions

Collected from public candidate posts and coding forums. Updated Nov 2026.