• + 3 comments

    Edit - after discussing with @petrovovitch, I see that the shortcut I "discovered" is Kruskal's Minimum Spanning Tree algorithm, and has nothing to do with the edge weights being distinct or being powers of 2 - but either way, it does work. Subsequently counting edge use, as he suggests, is how I solved it as well.