Course section
Trees & Applications
Represent hierarchy and ordered data with binary trees, search trees, self-balancing trees, and multiway trees.
6 topicsTree Fundamentals
Trees model hierarchical relationships with nodes, edges, a root, parent-child links, depth, height, and subtrees.
Tree Traversals
Preorder, inorder, postorder, and level order visit every node in different orders for different tasks.
Binary Search Tree
A BST maintains smaller keys in the left subtree and larger keys in the right subtree, enabling ordered operations.
AVL Tree
An AVL tree maintains a balance factor of −1, 0, or 1 at every node using rotations after updates.
B-Tree
B-trees store many keys per node and remain shallow, making them ideal for databases and storage systems where block access dominates.
Tree Applications
Trees power file systems, syntax trees, indexes, autocomplete, routing, compression, and hierarchical user interfaces.