Mixed Practice: Tree Fundamentals
Pattern recognition practice. Decision trees for choosing the right technique. Six problems spanning all tree fundamentals.
29 lessons
80 min
Lessons
1. Intro
(Pattern recognition practice)
3m
2. Decision Question 1
(Simple traversal vs DP)
3m
3. Decision Question 2
(One root vs all roots)
3m
4. Quiz: Technique Selection
Knowledge check
2m1 problems
5. Problem - Subordinates
(CSES - Subtree size)
3m1 problems
6. Think First
(Pause before reading)
3m
7. Quiz: Subordinates Technique
Knowledge check
2m1 problems
8. Subordinates - Implementation
(C++ code)
3m1 problems
9. Problem - Tree Diameter
(CSES - Longest path)
3m1 problems
10. Think First
(Two approaches exist)
3m
11. Quiz: Diameter Approaches
Knowledge check
2m1 problems
12. Tree Diameter - Implementation
(DP approach)
3m1 problems
13. Problem - Tree Matching
(CSES - Max matching)
3m1 problems
14. Think First
(State definition)
3m
15. Quiz: Matching States
Knowledge check
2m1 problems
16. Tree Matching - Implementation
(Subtree DP with states)
3m1 problems
17. Problem - Tree Distances II
(CSES - Sum of distances)
3m1 problems
18. Think First
(Rerooting pattern)
3m
19. Quiz: Rerooting Transition
Knowledge check
2m1 problems
20. Tree Distances II - Implementation
(Rerooting DP)
3m1 problems
21. Problem - Choosing Capital
(CF 219D - Directed edges)
3m1 problems
22. Think First
(Directed rerooting)
3m
23. Quiz: Directed Transition
Knowledge check
2m1 problems
24. Choosing Capital - Implementation
(Rerooting with directions)
3m1 problems
25. Problem - Max White Subtree
(CF 1324F - Forces rerooting)
3m1 problems
26. Think First
(Subtree + rerooting)
3m
27. Quiz: Max White Subtree
Knowledge check
2m1 problems
28. Max White Subtree - Implementation
(Rerooting with max)
3m1 problems
29. Section Recap
(Pattern recognition summary)
3m