# Leetcode 2133: Check if Every Row and Column Contains All Numbers

In this problem, we are trying to find out in a 2-dimension if every number from 1 to n is in each row and each column:

An

`n x n`

matrix isvalidif every row and every column containsallthe integers from`1`

to`n`

(inclusive).

Given an`n x n`

integer matrix`matrix`

, return`true`

if the matrix isvalid.Otherwise, return`false`

.

Two examples that we can use for testing: