Loading repovive.com/roadmaps/graph-theory
Roadmaps
Graph Theory
Small-to-Large Merging
Problemset
Discussion
AI Helper
Graph Fundamentals
0/41
Depth First Search (DFS)
0/41
Breadth First Search (BFS)
0/40
Flood Fill & Grid Graphs
0/32
Bipartite Graphs
0/48
Tree Fundamentals
0/44
Tree Diameter & Center
0/45
Subtree DP
0/44
Floyd-Warshall Algorithm
0/41
Dijkstra's Algorithm
0/40
Bellman-Ford Algorithm
0/48
Mixed Practice - Shortest Paths
0/36
Disjoint Set Union (DSU)
0/49
Minimum Spanning Trees
0/48
Topological Sort
0/41
DP on DAGs
0/50
Mixed Practice: Graph Traversals
0/35
Strongly Connected Components
0/45
2-SAT
0/51
Mixed Practice: Connectivity & MST
0/35
Rerooting Technique
0/39
Euler Tour Technique
0/51
Mixed Practice: Tree Fundamentals
0/29
Binary Lifting
0/50
Lowest Common Ancestor (LCA)
0/51
Games on Graphs
0/62
Heavy-Light Decomposition
0/49
Centroid Decomposition
0/55
Small-to-Large Merging
0/40
1
Intro
2
The Merging Problem
3
Naive Merging
4
Worst Case: Chain Tree
5
The Core idea
6
Why O(n log n) Works
7
Implementation Pattern
8
Code Structure
9
Tracking Subtree Sizes
10
Reusing the Largest Set
11
Problem - Distinct Colors
12
Distinct Colors - Naive Approach
13
Distinct Colors - Algorithm
14
Distinct Colors - Implementation
15
Distinct Colors - Walkthrough
16
Distinct Colors - Lessons
17
Problem - Lomsat gelral
18
Lomsat gelral - Observation
19
Lomsat gelral - Algorithm
20
Lomsat gelral - Maintaining the Max
21
Lomsat gelral - Implementation
22
Lomsat gelral - Walkthrough
23
Lomsat gelral - Lessons
24
When to Use Small-to-Large
25
Alternatives to Small-to-Large
26
Memory Considerations
27
Connection to Heavy-Light Decomposition
28
Implementation Tips
29
Debugging Small-to-Large
30
Quiz: Small-to-Large Complexity
31
Quiz: Small-to-Large Use
32
Variations of the Technique
33
Practice Tips
34
Common Problem Variations
35
Online vs Offline
36
Space Improvement
37
Constant Factors
38
Combining with Other Techniques
39
Historical Note
40
Section Recap
Functional Graphs
0/47
Mixed Practice: Advanced Tree Techniques
0/36
Bridges and Articulation Points
0/58
Network Flow
0/54
Maximum Bipartite Matching
0/50
Minimum Cut
0/47
Euler Paths and Circuits
0/37
Mixed Practice: Advanced Graphs
0/24
29.1
Intro
3 minutes
100%
Tasks
Read Unit