Introduction to a Binary Search Tree (BST)

Let's learn about binary search trees.

We'll cover the following

What is a BST?

A BST or a binary search tree is a binary tree in which nodes are ordered in the following way:

  • The key in the left node is less than the key in its parent node.
  • The key in the right node is greater than the key in its parent node.
  • No duplicate key is allowed.

Letā€™s look at the following figure to better understand a BST.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy