Skip to content
playdsa
Preferences

Make yourself comfortable.

Saved on this browser. Your device’s reduced-motion preference is always respected.

Theme
Advanced settings
Back to syllabus

Trees and BST

6 chapters · 15 challenges · The Whisper Woods

Understand the idea, practise through play, then prove it in code. Choose your next quest below.

Visual introduction to this topic
Start here · 3 minute mental model

What is a tree?

A tree organizes nodes into parent-child branches with one path from the root to each node. Its shape lets algorithms solve a whole structure by solving its subtrees.

Think of a game skill tree. Unlocking one skill opens only its descendants. You can explore one branch deeply or visit every skill at the same depth.

Carry the parent rule downward and combine child answers upward.

DFS follows a branch

Recursion or a stack carries state from parent to child.

BFS follows a level

A queue visits every node at one depth before the next.

BST adds an invariant

Every left value is smaller and every right value is larger under the chosen rule.

What you will learn firstThe Inorder Path

Visit left, node, then right

Begin the guided lesson

Your chapter route

The Inorder Path

Continue
Source reviewed

Built from authoritative material

This track is checked against the sources below. Visual traces still carry their own complete or guided coverage label, so unfinished explanations are not presented as complete executions.

Help shape PlayDSA

Something confusing, broken, or missing? Leave a quick note without leaving your lesson.

Please leave out passwords, payment details and other private information.

Page included: /

Sign in to save feedback here, or send it with your email app. Your draft stays here while you sign in.

Open email instead