Yao's Page ✨
Welcome to my page! I mostly use this space to write about 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.