Advanced Graphs
118 / 170Advanced GraphsLesson 3 of 6About 48 min
Not a shortest path. The cheapest set of edges that leaves nothing isolated.
You have working code for weighted shortest paths from a start node. What single change turns it into a minimum spanning tree algorithm?
Read the constraints first and let them tell you what complexity is expected. Derive the approach, implement it, run the tests, and submit when it passes.