#1584

Min Cost to Connect All Points

medium· Advanced Graphsruns: 0

You are given an array points representing integer coordinates of some points on a 2D plane. The cost of connecting two points is the Manhattan distance between them. Return the minimum cost to make all points connected, where there is exactly one simple path between any two points.

sign in to paste and practice your own solution
desktop only

codedrill is a typing game and needs a real keyboard. open this on a laptop or desktop to practice.

you can still browse problems and sections from your phone.