Mixed Practice: Advanced Tree Techniques
Mixed Practice: Advanced Tree Techniques
Lessons
1. Intro
Pattern recognition across ...
2. Reading the Clues
What the problem statement ...
3. Subtree vs Path Queries
First decision splits the tree
4. Counting vs Computing
(Path counting needs centroid)
5. Merging Information
When subtrees combine their...
6. Problem - Company Queries II
(CSES Tree, LCA application)
7. Think First - Company Queries II
(Before jumping to code)
8. Quiz: Company Queries II
Knowledge check
9. Reveal - Company Queries II
(Why LCA is the right choice)
10. Company Queries II - Implementation
(Binary lifting LCA code)
11. Lessons - Company Queries II
(Pattern recognition takeaway)
12. Problem - Path Queries II
CSES Tree, path max with up...
13. Think First - Path Queries II
(Updates change everything)
14. Quiz: Path Queries II
Knowledge check
15. Reveal - Path Queries II
(Why HLD handles updates)
16. Path Queries II - Implementation
(HLD with segment trees)
17. Lessons - Path Queries II
(When to use HLD)
18. Problem - Blood Cousins
Codeforces 208E, LCA + Eule...
19. Think First - Blood Cousins
(Combining two techniques)
20. Quiz: Blood Cousins
Knowledge check
21. Reveal - Blood Cousins
(Two techniques work together)
22. Blood Cousins - Implementation
LCA to find ancestor, Euler...
23. Lessons - Blood Cousins
(Combining techniques)
24. Problem - Lomsat gelral
Codeforces 600E, Small-to-L...
25. Think First - Lomsat gelral
Merging subtree frequency c...
26. Quiz: Lomsat gelral
Knowledge check
27. Reveal - Lomsat gelral
(Why Small-to-Large works)
28. Lomsat gelral - Implementation
DFS with Small-to-Large mer...
29. Lessons - Lomsat gelral
(When to merge small-to-large)
30. Problem - Fixed-Length Paths I
(CSES, centroid decomposition)
31. Think First - Fixed-Length Paths I
(Counting paths by length)
32. Quiz: Fixed-Length Paths I
Knowledge check
33. Reveal - Fixed-Length Paths I
(Why centroid splits the tree)
34. Fixed-Length Paths I - Implementation
Centroid recursion with dis...
35. Lessons - Fixed-Length Paths I
When to use centroid decomp
36. Section Recap
(Pattern recognition summary)