Algorithms and Data Structures

Lesson 08 · 16 min

Trees: binary tree, BST and traversals

Nodes, height, four ways to walk a tree and search in O(log n).

16 minLesson 8 of 8Practice includedAsk AI on any point

A tree is nodes connected so that exactly one path leads from the root to each node. The DOM, a file system, JSON, threaded comments: all of these are trees. In a binary tree each node has at most two children, left and right.

Sign in to continue

The rest of this lesson opens after sign up

The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.