We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ac6053 commit 34d618fCopy full SHA for 34d618f
my-submissions/e2965.py
@@ -0,0 +1,8 @@
1
+class Solution:
2
+ def findMissingAndRepeatedValues(self, grid: List[List[int]]) -> List[int]:
3
+ cnt = Counter()
4
+ for g in grid :
5
+ cnt.update(g)
6
+
7
+ return [[k for k, v in cnt.items() if v == 2][0],
8
+ [x for x in range(1, len(grid) ** 2 + 1) if x not in cnt][0]]
0 commit comments