LeetCode 2319. Check if Matrix Is X-Matrix Java Solution
Jul 3, 2024 · 2 min read · Problem Description Problem: Check if Matrix is X-Matrix Description: Determine if a given square matrix is an X-matrix. An X-matrix has all elements zero except those on the main diagonal and the anti-diagonal. Approach Idea: To check if each e...
Join discussion