#Leetcode

Опубликовано: 28 Октябрь 2024
на канале: The Exception Handler
229
13

Here is the solution to "X -Matrix " leetcode question. Hope that you will like the way I have explained the solution.

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 a square matrix, return true if grid is an X-Matrix. Otherwise, return false.

******* Table of content *******
00:00 Understanding the problem statement
02:54 Algo
04:13 Understanding Time and space complexity
05:01 Final code in Golang
08:13 Thank you


Check if Matrix is X-Matrix
X- Matrix
Facebook Coding Interview question,
google coding interview question,
leetcode solution
X- Matrix Golang

#leetcode #leetcodesolution #2319 #X-Matrix #Amazon #Facebook #CodingInterview #Google #golang #go #golangprogramming #dsa #theexceptionhandler