LeetCode 1584: Min Cost To Connect All Points — Step-by-Step Visual Trace
Medium — Graph | Union Find | Minimum Spanning Tree | Greedy
The Problem
Find the minimum cost to connect all points in a 2D plane where the cost between any two points is the Manhattan distance (sum of absolute differences of coordinates).
Approach
...
blog.tracelit.dev2 min read