Given a 2D grid of 1s (houses) and 0s (empty space), find the minimum cost to connect all houses. Connecting a house to an existing connected network costs 0, while starting a new connection or…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.