Tap here to switch tabs
Problem
Submissions

Problem: Check if Every Row and Column Contains All Numbers

med
30 min
Try to solve the Check if Every Row and Column Contains All Numbers problem.

Statement

An nimesnn imes n integer matrix is considered valid if every row and every column contains all the integers from 11 to nn inclusive.

Given an nimesnn imes n integer matrix matrix, return true if the matrix is valid, or false otherwise.

Constraints:

  • n == matrix.length == matrix[i].length

  • 1≤1 \leq n ≤100\leq 100

  • 1≤1 \leq matrix[i][j] ≤\leq n

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Check if Every Row and Column Contains All Numbers

med
30 min
Try to solve the Check if Every Row and Column Contains All Numbers problem.

Statement

An nimesnn imes n integer matrix is considered valid if every row and every column contains all the integers from 11 to nn inclusive.

Given an nimesnn imes n integer matrix matrix, return true if the matrix is valid, or false otherwise.

Constraints:

  • n == matrix.length == matrix[i].length

  • 1≤1 \leq n ≤100\leq 100

  • 1≤1 \leq matrix[i][j] ≤\leq n