Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Skill

Binary Trees & Traversals

Represent binary trees and solve tree problems with depth-first and level-order traversals.

Intermediate1 roadmap

3 objectives 6 steps about 120 min

Check what you know

The lessons are coming later. The knowledge check is ready now.

Take the knowledge check

This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.

Learning objectives

  • Implement preorder, inorder and postorder traversals both recursively and iteratively, and level-order traversal with a queue.
  • Solve tree problems by combining values returned from subtrees (height, diameter, balance check, path sums, lowest common ancestor) in O(n).
  • Serialize and deserialize a binary tree and rebuild one from its preorder and inorder sequences.

Lesson plan

6 steps, about 120 min · 0 of 5 lessons available so far

  1. Tree Vocabulary and Node Representation Concept · 15 min · coming later
  2. Three Depth-First Orders, Two Ways Worked example · 25 min · coming later
  3. Level by Level with a Queue Worked example · 15 min · coming later
  4. Answers That Bubble Up from Subtrees Worked example · 25 min · coming later
  5. Lab: Serialize, Deserialize, Rebuild Lab · 25 min · coming later
  6. Check: Tree Traversal Problems Knowledge check · 6 questions

Practise it

Write functions for maximum depth, diameter, right-side view, path-sum count and lowest common ancestor, plus a serialize/deserialize pair whose round trip is verified on 500 randomly generated trees.

Build it from scratch

Practice builds that exercise this skill by re-creating a real technology.

Browse 41 tutorials that practise it

References

Hard prerequisites

Unlocks

On these roadmaps

Progress and evidence for this skill are shared across all of them.