Neural Ninjas Β· DSA Simulation Labs Β· Lab 31

🌲 The Kruskal Sorter

Every edge lines up sorted by weight, cheapest first. Each one gets tried in order β€” accepted if it connects two separate islands, rejected on the spot if both ends are already on the same island, since that would only create a closed loop.

Sorter Log

Controls

πŸ“Š SorterI only ever look at the cheapest edge left in line. I never jump ahead to a pricier one, no matter how tempting it looks.
🏝️ IslandsEvery node starts as its own island. An accepted edge merges two islands into one β€” that's the only thing an edge is ever allowed to do.
Pick a level above to begin.