← BlackBuck questions

First and Last Indices of Target in Sorted Array

Filed under BlackBuck

The question

Given a sorted array with repeating numbers and a target value, find the starting and ending indices of the target value, returning [-1, -1] if not present.

No write-up yet. Related questions below have one.

Related BlackBuck questions

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