


‘Node 0 must be reachable from all other nodes.’ means 0 is the root of a tree.
And because we are going to remove extra edges, a circle shouldn’t exist.
‘Each node has at most threshold
outgoing edges.’ In fact, we didn’t use this param. Using prim’s algo, there won’t be multiple outgoing edges.