Problem 2319 · Easy

Check if Matrix Is X-Matrix

A square matrix is an X-matrix when its two diagonals are nonzero and every other cell is zero, checked cell by cell.

Open the interactive visualisation