New
The Learning module is now live
See what's new
×
Question Bank
Learning
NEW
Pricing
Blog
Forum
HOT
JobRadar
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Pinterest
Coding Question
AI Insights
Quick Summary
Distribute an array of values into two separate lists based on their current cumulative sums.
Apply a greedy rule where each value goes to the currently shorter list, with ties assigned to the left.
Preserve the original processing order of elements within each resulting column.
What This Tests
Greedy algorithm implementation
Dynamic state tracking during iteration
Array/list management and partitioning
Complexity analysis for sequential processing
Common Patterns
Greedy
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected