Matrix Element Sum Based on Indices Parity
Filed under Amagi
The question
Given a 2-D matrix of size m x n, if (m+n) is even, return the sum of all elements arr[i][j] where (i+j) is even; otherwise, return the sum of all elements where (i+j) is odd.
No write-up yet. Related questions below have one.
Related Amagi questions
Collected from public candidate posts and coding forums. Updated Nov 2026.