Loading repovive.com/roadmaps/graph-theory
Roadmaps
Graph Theory
Lowest Common Ancestor (LCA)
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
1
Intro
2
What is LCA?
3
Why LCA Matters
4
Naive Approach - The Idea
5
Naive Approach - Implementation
6
Binary Lifting for LCA
7
Binary Lifting - Preprocessing
8
Core Idea - Binary Search on Ancestors
9
Binary Lifting - Climbing Together
10
Binary Lifting - Complexity
11
Problem - LCA of a Binary Tree
12
Problem - LCA of a Binary Tree - Read Statement
13
Core Idea - Multiple Approaches Exist
14
Core Idea - Base Cases
15
Algorithm - Recursive LCA
16
Implementation - Recursive LCA
17
Implementation - LCA of a Binary Tree - Implement Solution
18
Walkthrough - Example Tree
19
Lessons - Recursive Tree Traversal
20
Euler Tour for LCA
21
Euler Tour - Construction
22
LCA to RMQ Reduction
23
Sparse Table for RMQ
24
Sparse Table - Building
25
Sparse Table - Querying
26
Euler Tour + RMQ - Full Algorithm
27
Euler Tour + RMQ - Complexity
28
Distance Between Two Nodes
29
Problem - Distance Queries
30
Problem - Distance Queries - Read Statement
31
Core Idea - Precompute Depths and LCA
32
Implementation - Distance Queries
33
Implementation - Distance Queries - Implement Solution
34
Lessons - Amortized Preprocessing
35
Problem - Counting Paths
36
Problem - Counting Paths - Read Statement
37
Core Idea - Path as Range Update
38
Core Idea - Propagating Counts
39
Algorithm - Counting Paths
40
Implementation - Counting Paths
41
Implementation - Counting Paths - Implement Solution
42
Walkthrough - Example
43
Core Insight - Parent Decrement
44
Lessons - Difference Arrays on Trees
45
Path Queries Using LCA
46
Weighted Binary Lifting
47
Quiz: LCA Distance
48
Binary Lifting vs Euler Tour
49
Common Mistakes
50
Extensions
51
Section Recap
Games on Graphs
0/62
Heavy-Light Decomposition
0/49
Centroid Decomposition
0/55
Small-to-Large Merging
0/40
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
25.1
Intro
3 minutes
100%
Tasks
Read Unit