Min Cost to Connect All Points
You are given an array points representing integer coordinates of some points on a 2D-plane, where points[i] = [xi, yi]. The cost of connecting two points [xi, yi] and [xj, yj] is the manhattan distance between them: |xi - xj| + |yi - yj|. Return the minimum cost to make all points connected.
Min Cost to Connect All Points

You are given an array points representing integer coordinates of some points on a 2D-plane, where points[i] = [xi, yi]. The cost of connecting two points [xi, yi] and [xj, yj] is the manhattan distance between them: |xi - xj| + |yi - yj|. Return the minimum cost to make all points connected.

Example 1:
Input: [[0,0],[2,2],[3,10],[5,2],[7,0]]
Output: 20
Input
arr =[[0,0],[2,2],[3,10],[5,2],[7,0]]

Start Prim's Cost: 0

0

1

2

3

4

Variables
No variables to display
DepthFunction Call
Stack empty
0/24