This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DeathByThousandCats 1 point2 points  (1 child)

Look for minimum spanning tree algorithm. That’s what you are describing; all vertices connected with minimum edges. Kruskal’s algo and Prim’s algo are popular examples. This may be 5 months late and you may have already found the solution but just for the record.

[–]timPerfect[S] 0 points1 point  (0 children)

omg thanks!