Loading repovive.com/roadmaps/graph-theory
Roadmaps
Graph Theory
Binary Lifting
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
1
Intro
2
The k-th Ancestor Problem
3
Naive Approach
4
Binary Representation Core Idea
5
Sparse Table Idea
6
Table Dimensions
7
Base Case - First Column
8
Recurrence Relation
9
Recurrence Example
10
Quiz: Sparse Table Construction
11
Building the Table
12
Building Code
13
Answering Queries
14
Query Pseudocode
15
Query Example
16
Quiz: Query Decomposition
17
Complexity Summary
18
Problem - Company Queries I
19
Core Idea - Tree Structure
20
Core Idea - Handling Invalid Queries
21
Algorithm
22
Company Queries I - Implementation
23
Walkthrough
24
Lessons Learned
25
Quiz: K-th Ancestor Edge Cases
26
Extension - LCA
27
Problem - Company Queries II
28
Core Idea - Same Depth First
29
Core Idea - Binary Search for LCA
30
Why This Works
31
Algorithm
32
Company Queries II - Implementation
33
Walkthrough
34
Walkthrough - Different Subtrees
35
Lessons Learned
36
Quiz: LCA via Binary Lifting
37
Problem - Kth Ancestor of a Tree Node
38
Core Idea - Constructor Preprocessing
39
Core Idea - Query Method
40
Algorithm
41
Kth Ancestor - Implementation
42
Walkthrough
43
Lessons Learned
44
Quiz: Time and Space Tradeoffs
45
Applications Beyond Ancestors
46
Space Improvement Note
47
Comparison to Naive Approach
48
Quiz: Binary Lifting Recurrence
49
Next Section Teaser
50
Section Recap
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
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
24.1
Intro
3 minutes
100%
Tasks
Read Unit