Sum of values in a 2D array under constraints
Filed under Amazon
The question
Given a 2D array and specific constraints, find the sum of values. The interviewer requested an initial basic approach, followed by optimizations to reduce time and space complexity.
No write-up yet. Related questions below have one.
Related Amazon questions
Collected from public candidate posts and coding forums. Updated Nov 2026.