← Amazon questions

Search in a sorted array of unknown size

Filed under Amazon

Given a reader interface for a sorted array of unknown length, efficiently search for a target element and return its index. If the element is not present, return -1.

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

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