Understanding Binary Search Trees, Red-Black Trees, AVL Trees, Hash Tables, and HashMaps
Classified in Computers
Written at on English with a size of 40.07 KB.
Binary Search Tree (BST)
Binary search tree (BST) is a tree in which all nodes follow the below mentioned properties:
- The left sub-tree of a node has a key less than or equal to its parent node's key.
- The right sub-tree of a node has a key greater than or equal to its parent node's key.
- Binary search tree (BST) divides all its sub-trees into two segments: left sub-tree and right sub-tree and can be defined as left_subtree (keys) ≤ node (key) ≤ right_subtree (keys).
Red-Black Tree
A red-black tree is a binary search tree in which each node is colored red or black. The root is black. The children of a red node are black. Every path from the root to leaf has the same number of black nodes and all leaves are black.
AVL Tree
Adelson, Velski & Landis
... Continue reading "Understanding Binary Search Trees, Red-Black Trees, AVL Trees, Hash Tables, and HashMaps" »