You are given an m × n matrix initially filled with 0’s.
You are also given a 2D array indices, where each element indices[i] = [ri, ci] represents a 0-indexed operation that increments:
• All cells in row ri
• All cells in column ci
After performing all operations, return the number of cells that contain odd values in the final matrix.
Input: m = 2 n = 3 indices = [[0,1],[1,1]]
Output: 6
Input: m = 2 n = 2 indices = [[1,1],[0,0]]
Output: 0
Accepted:
Submission: