Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 504 Bytes

File metadata and controls

17 lines (12 loc) · 504 Bytes

Middle matrix sums

Given an integer matrix, m, with odd # dimensions, n x n, (e.g 3 x 3, 5 x 5, etc), find the sum of middle row as well as the middle column.

For example, given:

[1,2,3] 
[4,5,6] 
[7,8,9]

Your program would output:

  • Sum middle row = 15 (e.g. 4+5+6)
  • Sum middle column = 15 (e.g. 2+5+8)

Click here to view this problem in an interactive Colab (Jupyter) notebook.