刚刚在看今天的LeetCode
https://leetcode.com/problems/most-stones-removed-with-same-row-or-column/
有一笔我刚才一直错
看了一下是我要合并5和8
https://imgur.com/ZdserUp
标准答案是 :
0 1 1 3 4 0 0 1 1 3
0 0 1 3 4 0 0 1 1 3
把1的Union值改成0
不过我写成 :
0 1 1 3 4 0 0 1 1 3
0 1 1 3 4 0 0 1 0 3
直接把8的Union改成0