← Amazon questions

Maximize number of 1s after flipping a subarray

Filed under Amazon

Given a binary array, flip at most one contiguous subarray (0s to 1s, 1s to 0s) to maximize the total count 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.