
[LeetCode] 2965. Find Missing and Repeated Values (Python)
·
알고리즘/LeetCode
난이도: EasyProblem DescriptionYou are given a 0-indexed 2D integer matrix grid of size n * n with values in the range [1, n2]. Each integer appears exactly once except a which appears twice and b which is missing. The task is to find the repeating and missing numbers a and b. Return a 0-indexed integer array ans of size 2 where ans[0] equals to a and ans[1] equals to b. Problem ExampleExample 1:In..