All problems
› DSU problems
DSU problems
22 DSU DSA practice problems on CampusCode, each with statement, examples and constraints.
1009. Find Number of Connected Components Using DSU
Easy
Graphs
1010. Detect Cycle Using DSU
Easy
Graphs
1011. Check if Two Nodes are in Same Component
Easy
Graphs
1018. Check if Graph is Tree
Easy
Graphs
1023. Redundant Connection
Easy
Graphs
1036. Minimum Spanning Tree — Kruskal's Algorithm
Medium
Graphs
1040. Minimum Spanning Tree — Number of Edges
Medium
Graphs
1049. Accounts Merge
Medium
Graphs
1050. Satisfiability of Equality Equations
Medium
Graphs
1051. Number of Islands II (Dynamic)
Medium
Graphs
1052. Largest Component Size by Common Factor
Medium
Graphs
1053. Making a Large Island
Medium
Graphs
1060. Number of Provinces — Connected Components
Medium
Graphs
1064. Graph Valid Tree
Medium
Graphs
1075. Check Connectivity After Node Removal
Medium
Graphs
1090. Second Best Minimum Spanning Tree
Hard
Graphs
1091. Maximum Spanning Tree
Hard
Graphs
1092. Connecting Cities With Minimum Cost
Hard
Graphs
1093. DSU with Rollback — Online Connectivity
Hard
Graphs
1094. Connected Components After Edge Removals (Offline)
Hard
Graphs
1112. Max Stones Removed with Same Row or Column
Hard
Graphs
1113. Couples Holding Hands — Minimum Swaps
Hard
Graphs