[Solved] Check if Matrix Is X-Matrix LeetCode Contest Problem
Check if Matrix Is X-Matrix: A square matrix is said to be an X-Matrix if both of the following conditions hold: All the elements in the diagonals of the matrix are non-zero. All other elements are 0. Given a 2D integer array grid of size n x n representing…