Difficulty: MEDIUM
Categories: μ λμ¨νμΈλ/MST
Source: https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/