DSA track
Tree Problems
Practise 40 binary tree problems from basics to advanced in Python, C++, Java, JavaScript and TypeScript.
This track covers traversals, depth and height, paths, lowest common ancestors, building trees and serialising them, with recursion and queues. The problems run from easy to hard, so each idea builds on the one before. Every problem is judged against hidden test cases in five languages.
What you will practise:
- Basics: 14 easy problems such as Tree Depth, Tree Inside Tree and Family Tree Post-Order.
- Core Problems: 18 medium problems such as Floor by Floor, Prune Zero Branches and Prune to a Forest.
- Hard Problems: 8 hard problems such as Richest Path, Height After Cutting and Path Maximum With Updates.
Start with the basics, move on to the core problems, and try the hard ones when the pattern feels natural. Every problem comes with worked examples and clear constraints. For a full path across all of DSA, see Revquix 80, Revquix 150 and Revquix 300.
- 3 sections
- 40 problems
What it covers
The path
- Floor by FloorMedium
- View From the RightMedium
- Downward Target PathsMedium
- Shared AncestorMedium
- Widest FloorMedium
- Text to TreeMedium
- Deepest Leaves TotalMedium
- Spread the CoinsMedium
- Prune Zero BranchesMedium
- Insert a FloorMedium
- Deepest Leaves' AncestorMedium
- Same-Value TrailMedium
- Smallest Leaf WordMedium
- Farthest Two TownsMedium
- Top Scoring NodesMedium
- Guard the CorridorsMedium
- Family Tree FloorsMedium
- Prune to a ForestMedium