2352. Equal Row and Column Pairs
Equal Row and Column Pairs - LeetCode 0부터 시작하는 n x n 정수 행렬 grid가 주어집니다. 행 ri와 열 cj가 동일한 쌍 (ri, cj)의 수를 반환하세요. 행과 열 쌍은 동일한 배열을 동일한 순서로 포함하고 있을 때 동일한 것으로 간주합니다. Given a 0-indexed n x n integer matrix grid, return the number of pairs (ri, cj) such that row ri and column cj are equal. A row and column pair is considered equal if they contain the same elements in the same order (i.e., an equal array)..
LeetCode
2023. 10. 26. 01:56