Connecting Cities With Minimum Cost
There are `n` cities numbered from `1` to `n` and a list of undirected connections `[cityA, cityB, cost]`. Return the minimum total cost to connect every city, or `-1` if the graph is disconnected. For `n = 1`, the minimum cost is `0`.