Summer Sale
Limited Time Deal: Unlock all premium questions for over 30% off
14
:
02
:
12
:
46
OA [CodeSignal] Maximum Protected City Population
You are given an integer array population and a binary string protection of the same length. A city at index i is currently protected if protection[i] == '0' and unprotected if protection[i] == '1'.
You may optionally shift any protected city's marker one position to the left (i.e., shift a '0' one index earlier in the string). Each protection marker can be shifted at most once, and two markers cannot occupy the same position after shifting.
...
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.