Grokking Graph Algorithms for Coding Interviews
Ask Author
Back to course home

0% completed

Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree (hard)
Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Problem Statement

Given a weighted undirected graph with n vertices numbered from 0 to n-1, and an array edges where edges[i] = [a, b, weight] represents a bidirectional and weighted edge between nodes a and b.

A minimum spanning tree (MST) is a subset of the graph's edges that connects all vertices without cycles and with the smallest possible total edge weight.

An edge is critical if removing it would cause the MST's total weight to increase. An edge is pseudo-critical if it can be part of some MSTs but is not required in all MSTs.

.....

.....

.....

Like the course? Get enrolled and start learning!

Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible