Workspace

Trees

3 day streakD
All algorithms
INTERMEDIATE · 3 PRACTICE PROBLEMS

Trees

Explore branches. Discover recursive thinking.

Learn the pattern Put it into practice
THE CORE IDEA

Depth-first search

Follow one branch at a time. Recursion makes the repeated work feel natural.

O(n)

A good place to practice

Start simple, then build up to the next challenge.

3 problems
SolvedProblemDifficultyTopicAcceptanceBookmark
Invert Binary TreeEasyTrees80.1%
Maximum Depth of Binary TreeEasyTrees76.4%
Binary Tree Level Order TraversalMediumTrees70.8%

A good place to start

Explore a pattern

A little guidance

Start with a pattern, read through a problem, and mark it solved when the idea clicks. Save anything you want to revisit.

This preview uses sample content. Your bookmarks and solved checkmarks stay in this browser.

Explore the roadmap