~/problems
Problems
Basics first, then the classics, then company-style assessments. Every problem has tests you run right here; multi-level ones unlock as you go. See the roadmap.
Advanced & competitive
Tree techniques
Binary lifting, LCA, Euler tours.
8 problems
Advanced & competitive
Tree techniques Binary lifting, LCA, Euler tours.
Binary lifting / LCA
- Basics: build the jump table basics py · c++ · java easy
- Earliest ancestor born since a year py · c++ · java easy
- K-th ancestor queries py · c++ · java medium
- Lowest common boss py · c++ · java medium
Euler tour of a tree
- Basics: entry and exit times (tin / tout) basics py · c++ · java easy
- Upstream or downstream? py · c++ · java easy
- Subtree sums with updates medium
- Root-to-node path sums with updates medium