</>OfferRetriever
DashboardDiscuss
NEW
Halloween SalePremium questions, over 30% offUnlock all premium questions for over 30% off
$10.42$7.08/mo

--

:

--

:

--

:

--

Get this deal
Back to Amazon Questions

OA [CodeSignal] Maximum Protected City Population

Medium

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. ...

Asked at:AmazonCodeSignal OAs

More Amazon interview questions

All Amazon interview questions
OfferRetriever

Master technical interviews with real questions from top companies. Build your confidence and career.

PRODUCT
PricingDashboardDiscussOfferRetriever vs LeetCodeCompare
LEGAL

© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.