3 ms·
Link cut trees. They can be used to query information about paths in a forest, while also allowing you to add and remove edges in the forest. For example, you
by aliceryhl 4y ago
Link cut trees. They can be used to query information about paths in a forest, while also allowing you to add and remove edges in the forest.
For example, you could use them to store the minimum spanning tree of a graph, while supporting updates if edges are added to the graph.
They can also be used to speed up max flow algorithms by finding the augmenting path in logarithmic time.