Re: [闲聊] 每日leetcode

楼主: Rushia (みけねこ的鼻屎)   2024-04-21 12:44:37
https://leetcode.com/problems/find-if-path-exists-in-graph/description
1971. Find if Path Exists in Graph
给你一个阵列表示的图,判断 source 和 destination 是否连通。
思路:
1.把所有边的点加到并查集,然后查这两点有没有连通就好。
py code:
作者: digua (地瓜)   2024-04-21 12:53:00
大师
作者: oinishere (是oin捏)   2024-04-21 13:09:00
大师

Links booklink

Contact Us: admin [ a t ] ucptt.com