https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/
連結グラフの数を数える問題
class Solution(object): def countComponents(self, n, edges)…