...

/

Solution: Minimum Spanning Trees

Solution: Minimum Spanning Trees

Discuss the solution of minimum spanning trees in this lesson.

Let's practice what we've learned so far.

Task

Suppose we are given both an undirected graph GG with weighted edges and a minimum spanning tree TT of GG. Provide code to update the minimum spanning tree when the weight of a single edge ee is decreased; we can follow the algorithm described below.

Logic building

Here’s the algorithm to update the minimum spanning tree TT when the weight of a single edge ee is decreased:

Algorithm


  • Identify the two nodes uu and vv that
...

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy