LeetCode --- 2133. Check if Every Row and Column Contains All Numbers 解题报告

avatar
作者
猴君
阅读量:0

Question:

Ann x nmatrix isvalidif every row and every column containsallthe integers from1ton(inclusive).

Given ann x ninteger matrixmatrix, returntrueif the matrix isvalid.Otherwise, returnfalse.

Example 1:

Input: matrix = [[1,2,3],[3,1,2],[2,3,1]] Output: true Explanation: In this case, n = 3, and every row and column contains the numbers 1, 2, and 3. Hence, we return true. 

Example 2:

广告一刻

为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!