In this tutorial, you will learn the Binary Search Tree data structure, its operations and basic implementation example with Java

Tree Data Structure

Tree is a non-linear data structure comprising 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 recursively
  • insert, add a new node into a tree
  • delete, remove 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