Fundamentals of binary tree

Pan Lu
2 min readFeb 5, 2024

--

A full binary tree

A full binary tree is a binary tree in which every node has either two or no children at all.

A complete binary tree

A complete binary tree is a type of binary tree where all levels are completely filled except possibly for the last level, which is filled from left to right.

A binary search tree (BST)

A binary search tree (BST) is a type of binary tree where each node has a key, and for every node, all keys in the left subtree are less than the node’s key, and all keys in the right subtree are greater than the node’s key, facilitating efficient searching, insertion, and deletion operations.

A balanced binary search tree

A balanced binary search tree is a binary search tree (BST) where the height difference between the left and right subtrees of any node is no more than one, ensuring the tree remains approximately balanced to maintain efficient search, insertion, and deletion operations. This balance condition minimizes the height of the tree, often implemented as AVL trees or Red-Black trees.

--

--

No responses yet