Binary Search Tree

Discrete Mathematical Structures [MAT 2101]


Binary Search Tree Anatomy

A Binary Search Tree is a structured way to store data to perform operations like insertion, deletion, and lookup efficiently.

A binary search tree consists of key components:

  1. Node: The element in a binary search tree that stores any value is called a Node.
  2. Root Node: The topmost node in a binary search tree is called the Root Node (e.g., Node A). It has no parent.
  3. Parent Node: A node that has one or more child nodes connected below it is called a Parent Node (e.g., Nodes A, B, C).
  4. Child Node: Any node directly connected below another node is called a Child Node (e.g., Nodes B & C are children of A).
  5. Leaf Node: A node with no children (no connected nodes below it) is called a Leaf Node (e.g., Nodes D, E, F).
  6. Edge: The visual connection or path between two connected nodes is called an Edge.
Interactive Structural Diagram A B C D E F

Hierarchical Trees

Understand root nodes, left and right subtrees, and depth properties governed by graph theory.

Logarithmic Search

Explore $O(\log n)$ search efficiency compared to standard sequential arrays.

Live Classroom Game

Test your tree insertion skills in real-time during our interactive classroom survival showdown.