Binary Tree

Intro

Tree is an ADT that represents a hierarchical structure with a set of nodes and a set of edges that connect pairs of nodes and has the following properties:

An undirected and connected acyclic graph ⇒ there are no cycles or loops

Recursive Tree Definition

Subtree

Binary Tree (BT) is a Tree for which

Screenshot 2022-07-29 at 10.11.58.png

Screenshot 2022-07-29 at 10.21.59.png

Screenshot 2022-08-04 at 12.36.40.png

Screenshot 2022-08-04 at 12.38.11.png

Binary Search Tree (BST)

Ternary / N-ary Trees

AVL Tree

The Little AVL Tree That Could

B Tree

Busying Oneself With B-Trees

Red-Black Tree

Painting Nodes Black With Red-Black Trees

AVL Tree

Segment Trees

Binary Indexed Tree

Root

Node

Edge

Path

Children

Parent

Sibling

Leaf node

Neighbour

Ancestor

Descendant

Degree

Distance

Level/Depth

Height

Width

Usage

e.g. unix file system

e.g. html

Comparison

Problems

Code


Resources