Solution: Minimum Spanning Trees
Solution to the challenge related to minimum spanning trees.
We'll cover the following...
Let's practice what we have learned so far.
Task
Suppose we are given both an undirected graph G
with weighted edges and
a minimum spanning tree T
of G
.
Provide code to update the minimum spanning tree when the weight of a single edge e
is decreased. We can follow the algorithm described below.
Logic building
Here’s the algorithm to update the minimum spanning tree when the weight of a single edge ...
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy