Problem 1572 · Easy

Matrix Diagonal Sum

Sum both diagonals of a square matrix and subtract the shared centre once. The visual outlines the two diagonals and the centre cell.

Open the interactive visualisation