โ† VMware questions

Find index of first 1 in sorted array

Filed under VMware

Given a sorted binary array containing only zeros and ones, find the 0-based index of the first occurrence of 1. If 1 does not exist in the array, 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 VMware questions

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