</>OfferRetriever
DashboardDiscuss
NEW

Halloween Sale

Unlock all premium questions for over 30% off

$10.42$7.08/mo

--

:

--

:

--

:

--

Get this deal
Back to Amazon Questions

Maximize Assigned Negative Signs

Easy

Question

You are given a sequence of n natural numbers a_1, a_2, ..., a_n, passed as the array arr. Put a sign, either "+" or "-", in front of every a_i so that each running total of the signed values, a_1 + a_2 + ... + a_i, stays strictly positive for every i with 1 <= i <= n. Under that requirement, make the number of "-" signs as large as possible and return that number. ...

Asked at:Amazon

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.