楼主:
Apache (阿帕契)
2024-04-21 22:00:07※ 引述《Rushia (早瀬ユウカの体操服 )》之铭言:
: https://leetcode.com/problems/find-if-path-exists-in-graph/description
: 1971. Find if Path Exists in Graph
: 给你一个阵列表示的图,判断 source 和 destination 是否连通。
: 思路:
: 1.把所有边的点加到并查集,然后查这两点有没有连通就好。
我觉得这题最妙的是
他怎么会是Easy
disjoint set算是蛮tricky的结构了
==