Introduction to Binary Search

Binary Search Tree

A Binary Search Tree is a data structure used in computer science for organizing and storing data in a sorted manner. Each node in a Binary Search Tree has at most two children, a left child and a right child, with the left child containing values less than the parent node and the right child containing values greater than the parent node. This hierarchical structure allows for efficient searching, insertion, and deletion operations on the data stored in the tree.

Binary Search Tree

Similar Reads

Introduction to Binary Search:

Introduction to Binary Search Tree – Data Structure and Algorithm Tutorials Applications of BST Application, Advantages and Disadvantages of Binary Search Tree...

Basic Operations on BST:

Insertion in Binary Search Tree Searching in Binary Search Tree Deletion in Binary Search Tree Binary Search Tree (BST) Traversals – Inorder, Preorder, Post Order Convert a normal BST to Balanced BST...

Easy Standard Problems on BST:

Iterative searching in Binary Search Tree A program to check if a binary tree is BST or not Binary Tree to Binary Search Tree Conversion Find the node with minimum value in a Binary Search Tree Check if an array represents Inorder of Binary Search tree or not How to determine if a binary tree is height-balanced? Sorted Array to Balanced BST Check for Identical BSTs without building the trees Convert BST to Min Heap Second largest element in BST Add all greater values to every node in a given BST Check if two BSTs contain same set of elements Sum of k smallest elements in BST...

Medium Standard Problems on BST:

Construct BST from given preorder traversal | Set 1 Sorted Linked List to Balanced BST Transform a BST to greater sum tree BST to a Tree with sum of all smaller keys Construct BST from its given level order traversal Check if the given array can represent Level Order Traversal of Binary Search Tree Lowest Common Ancestor in a Binary Search Tree Find k-th smallest element in BST (Order Statistics in BST) K’th Largest element in BST using constant extra space Largest number in BST which is less than or equal to N Find distance between two nodes of a Binary Search Tree Largest BST in a Binary Tree | Set 2 Remove all leaf nodes from the binary search tree Inorder Successor in Binary Search Tree Find a pair with given sum in BST Maximum element between two nodes of BST Find the largest BST subtree in a given Binary Tree Find a pair with given sum in a Balanced BST Two nodes of a BST are swapped, correct the BST How to handle duplicates in Binary Search Tree? Leaf nodes from Preorder of a Binary Search Tree (Using Recursion)...

Hard Standard Problems on BST:

Construct all possible BSTs for keys 1 to N In-place Convert BST into a Min-Heap Check given array of size n can represent BST of n levels or not Merge two BSTs with limited extra space K’th Largest Element in BST when modification to BST is not allowed Check if given sorted sub-sequence exists in binary search tree Maximum Unique Element in every subarray of size K Count pairs from two BSTs whose sum is equal to a given value x Print BST keys in given Range | O(1) Space Inorder predecessor and successor for a given key in BST Find if there is a triplet in a Balanced BST that adds to zero Replace every element with the least greater element on its right Count inversions in an array | Set 2 (Using Self-Balancing BST) Leaf nodes from Preorder of a Binary Search Tree Minimum Possible value of |ai + aj – k| for given array and k. Special two digit numbers in a Binary Search Tree Merge Two Balanced Binary Search Trees...

Contact Us