← Oracle questions

Find index to replace 0 with 1 for max consecutive 1s

Filed under Oracle

Given a binary array nums, find the index of the zero that, when replaced with a 1, produces the maximum number of consecutive 1s. If the array contains no zeros, return -1. If multiple indices…

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

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