โ† Amazon questions

Find range in bit array to maximize 1s after flipping

Filed under Amazon

Given a binary array, find a subarray to flip (0s to 1s, 1s to 0s) such that the total number of 1s in the array is maximized.

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.