C++UCS301Data Structures · C++
AnalysisLinearSearchSortingTreesHeapsGraphsSpatial
Complexity Lab C++ Practice Setup Visualizer
Back to curriculum

Course section

Trees & Applications

Represent hierarchy and ordered data with binary trees, search trees, self-balancing trees, and multiway trees.

6 topics
01

Tree Fundamentals

Trees model hierarchical relationships with nodes, edges, a root, parent-child links, depth, height, and subtrees.

Visual lab
02

Tree Traversals

Preorder, inorder, postorder, and level order visit every node in different orders for different tasks.

ComplexityC++ implementation Worked trace Visual lab
03

Binary Search Tree

A BST maintains smaller keys in the left subtree and larger keys in the right subtree, enabling ordered operations.

ComplexityC++ implementation Worked trace Visual lab
04

AVL Tree

An AVL tree maintains a balance factor of −1, 0, or 1 at every node using rotations after updates.

ComplexityC++ implementation Worked trace
05

B-Tree

B-trees store many keys per node and remain shallow, making them ideal for databases and storage systems where block access dominates.

Complexity
06

Tree Applications

Trees power file systems, syntax trees, indexes, autocomplete, routing, compression, and hierarchical user interfaces.

UCS301 Data Structures · C++17 · Year 2

Built for understanding, not memorisation · zssh.dev

Found a syllabus gap, incorrect explanation, or site issue? Visit the GitHub repository and open an issue.