PacktPublishing / Learning-JavaScript-Data-Structures-and-Algorithms-Third-Edition

Learning JavaScript Data Structures and Algorithms (Third Edition), published by Packt
MIT License
1.06k stars 430 forks source link

kruskal output different from prim #20

Open RichardWSD opened 1 year ago

RichardWSD commented 1 year ago

i think the kruskal test should be same as prim does, but it comes to * Kruskal Algorithm - Minimum Spanning Tree *** Edge Weight 0 - 1 2 1 - 2 2 1 - 3 4 // may be wrong here 1 - 4 2 3 - 5 2