← PayPal questions
CodingReported in a candidate post, Jul 2025

First and last positions in sorted array

Filed under PayPal

Given a sorted array of integers and a target value, find the starting and ending index of a given target value in O(log N) time. Return [-1, -1] if the target is not in the array.

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 PayPal questions

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