Problem

Return the sum of every value in a rectangular int[][] grid.

Examples

  • sum2D([[1, 2], [3, 4]]) -> 10
  • sum2D([[0, 0], [5]]) -> 5
Compile and test (Ctrl+Enter)