Leetcode 1489: Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree

Pierre-Marie Poitevin
3 min readJun 26, 2020

In this Leetcode problem, given a graph, we want to find which edges are in all minimum spanning trees, and which ones are only in some minimum spanning trees.

Problem statement

Solution

This is a cool problem and there are a lot of ways you can think about it, here are the ideas I used to solve it:

--

--