Available question text
Reorder the elements of an array to maximize the number of positive prefix sums — i.e., choose a sequence that keeps the running cumulative sum positive for as many prefixes as possible. This is an ordering/greedy optimization on prefix sums (n up to 1e5, values up to ±1e6).
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2587. Rearrange Array to Maximize Prefix Score
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source