โ† Amazon questions

Maximize consecutive 1s by flipping one 0

Filed under Amazon

Given a binary array, find the index of a single 0 that, if flipped to 1, maximizes the length of the contiguous sequence of 1s.

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.