FAQ’s (Frequently asked questions) on Binary Search Tree
1. What is a Binary Search Tree?
A binary search tree (BST) is a binary tree where every node in the left subtree is less than the root, and every node in the right subtree is of a value greater than the root. The properties of a binary search tree are recursive: if we consider any node as a “root,” these properties will remain true.
2. What is the Binary Search Tree Operation?
There are major three operations in Binary Search Tree: 1. Insertion, 2. Deletion, 3. Searching. Because of its properties its efficient to search any element in Binary Search Tree.
3. What is Binary Search Tree and AVL tree?
Binary Search Tree: A binary search tree (BST) is a binary tree where every node in the left subtree is less than the root, and every node in the right subtree is of a value greater than the root.
AVL Tree: Binary search trees (BSTs) that self-balance and rotate automatically are known as AVL trees.
4. What are the uses of Binary Search Tree?
Binary search trees can be used to implement abstract data types such as dynamic sets, lookup tables and priority queues, and used in sorting algorithms such as tree sort.
5. What is the difference between binary search tree and binary tree ?
A Binary search tree is a tree that follows some order to arrange the elements, whereas the binary tree does not follow any order.
Related Articles:
Introduction to Binary Search Tree – Data Structure and Algorithm Tutorials
Binary Search Tree is a data structure used in computer science for organizing and storing data in a sorted manner. Binary search tree follows all properties of binary tree and its left child contains values less than the parent node and the right child contains values greater than the parent node. This hierarchical structure allows for efficient Searching, Insertion, and Deletion operations on the data stored in the tree.
Table of Content
- What is Binary Search Tree?
- Properties of Binary Search Tree
- Handling duplicate values in the Binary Search Tree
- Operations performed on a BST
- 1. Searching a node in BST
- 2. Insert a node into a BST
- 3. Delete a Node of BST
- 4. Traversal (Inorder traversal of BST)
- Applications of BST
- Advantages
- Disadvantages
- FAQ’s (Frequently asked questions) on Binary Search Tree: