Tree Data Structure

Tree is a non-linear data structure consisting of a collection of nodes which are organized in hierarchy way

Binary Tree Data Structure

Binary Tree is a tree data structure in which each node has at most 2 children (left child and right child)

Binary Search Tree Data Structure

Binary Search Tree, aka ordered/sorted binary tree, is a binary tree in which all parent node's value are greater than theirs left child's values and less than theirs right child's values

Basic operations

  • traversal, visits each node in a tree exactly once
  • insert, adds a new node into a tree
  • delete, removes a node from a tree


You can implement a binary search tree with either a linked list, static array (capacity restricted) or a dynamic array

Binary Search Tree implementation example with Linked List