Yao's Page ✨
Welcome to my page! I use this space to share my thoughts on software.
There are N cities. You are given an array of connections. Each connection describes the cost of connecting one city to another. Return the minimum cost required to ensure that every pair of cities is connected by a path of connections.