Learnacy Lab

Minimum Spanning Tree · Computer Science

Sort edges by weight and add the lightest ones first. Skip any that would close a loop to build the cheapest connection.