Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Misc
8.8K+ articles
Sorting
1.8K+ articles
Searching
1.7K+ articles
Tree
1.4K+ articles
Binary Tree
330+ articles
Binary Search Tree
291+ articles
Tree Traversals
106+ articles
BST
25+ articles
Binary Search Trees
30 posts
Recent Articles
Popular Articles
Top 50 Binary Search Tree Coding Problems for Interviews
Last Updated: 13 March 2024
Binary Search Trees (BST) are like organized lists that help find, add, and remove items quickly. In our article "Top 50 Binary Search Tree Coding Problems for Interviews"...
read more
Algorithms
Binary Search Tree
interview-preparation
Binary Search Trees
GFG Sheets
DSA
DSA Sheet
C Program for Binary Search Tree
Last Updated: 29 May 2025
A binary Search Tree is a binary tree where the value of any node is greater than the left subtree and less than the right subtree. In this article, we will discuss Binary...
read more
Binary Search Tree
C Language
Binary Search Trees
DSA
POTD Solutions | 15 Oct' 23 | Normal BST to Balanced BST
Last Updated: 22 November 2023
View all POTD SolutionsWelcome to the daily solutions of our PROBLEM OF THE DAY (POTD). We will discuss the entire problem step-by-step and work towards developing an opti...
read more
Binary Tree
Competitive Programming
Binary Search Trees
DSA
GFG-POTD-Solutions
What is Binary Search Tree
Last Updated: 01 March 2023
A binary search tree (BST) is a binary tree in which the left subtree of a node contains only nodes with less value and the right subtree of a node contains only nodes wit...
read more
Tree
Binary Search Trees
Picked
DSA
Definitions and Meanings
Search N elements in an unbalanced Binary Search Tree in O(N * logM) time
Last Updated: 21 December 2022
Given an Unbalanced binary search tree (BST) of M nodes. The task is to find the N elements in the Unbalanced Binary Search Tree in O(N*logM) time.Examples:Input: search[]...
read more
Tree
Technical Scripter
Binary Search Trees
Technical Scripter 2022
DSA
Maximum absolute difference between the sibling nodes of given BST
Last Updated: 17 February 2023
Given a BST (Binary Search Tree) with N Nodes, the task is to find the maximum absolute difference between the sibling nodes.Two nodes are said to be siblings if they are ...
read more
Tree
Technical Scripter
Binary Search Trees
Technical Scripter 2022
DSA
Sum of all nodes with smaller values at a distance K from a given node in a BST
Last Updated: 16 October 2023
Given a Binary Search Tree, a target node in the BST, and an integer value K, the task is to find the sum of all nodes that are at a distance K from the target node whose ...
read more
Tree
Mathematical
Binary Search Tree
DFS
Recursion
Binary Search Trees
DSA
Sum of nodes in a Binary Search Tree with values from a given range
Last Updated: 21 October 2024
Given a Binary Search Tree consisting of n nodes and two positive integers l and r, the task is to find the sum of values of all the nodes that lie in the range [l, r].Exa...
read more
Tree
BST
Queue
Searching
Tree Traversals
Binary Search Trees
tree-level-order
DSA
Iterative approach to check if a Binary Tree is BST or not
Last Updated: 11 March 2024
Given a Binary Tree, the task is to check if the given binary tree is a Binary Search Tree or not. If found to be true, then print "YES". Otherwise, print "NO".Examples:In...
read more
Tree
Inorder Traversal
Binary Tree
BST
Stack
Binary Search Trees
DSA
Kth Smallest element in a Perfect Binary Search Tree
Last Updated: 30 June 2021
Given a Perfect BST with N nodes and an integer K, the task is to find the Kth smallest element is present in the tree.Example:Input:K = 3, N = 15 50 ...
read more
Complete Binary Tree
Algorithms
Searching
Binary Search Tree
interview-preparation
Binary Search Trees
median-finding
DSA
Check if the Binary Tree contains a balanced BST of size K
Last Updated: 23 August 2021
Given a Binary Tree and a positive integer K. The task is to check whether the Balanced BST of size K exists in a given Binary Tree or not. If it exists then print “Yes” e...
read more
Tree
PostOrder Traversal
Binary Tree
tree-traversal
Searching
Binary Search Tree
Recursion
Tree Traversals
Binary Search Trees
Traversal
DSA
Binary Search Tree | Set 3 (Iterative Delete)
Last Updated: 29 July 2024
Given a binary search tree and a node of the binary search tree, the task is to delete the node from the Binary Search tree Iteratively.Here are the three cases that arise...
read more
Delete Tree
BST
Binary Search Tree
Data Structures
Binary Search Trees
Picked
DSA
Double Threaded Binary Search Tree
Last Updated: 02 December 2023
Double Threaded Binary Search Tree: is a binary search tree in which the nodes are not every left NULL pointer points to its inorder predecessor and the right NULL pointer...
read more
Tree
Binary Tree
BST
tree-traversal
Advanced Data Structure
Binary Search Trees
threaded-binary-tree
DSA
Check if value exists in level-order sorted complete binary tree
Last Updated: 13 August 2021
Given a level-order sorted complete binary tree, the task is to check whether a key exists in it or not. A complete binary tree has every level except possibly the last, c...
read more
Tree
Binary Search
Sorting
Data Structures
Binary Search Trees
DSA
Find Leftmost and Rightmost node of BST from its given preorder traversal
Last Updated: 27 May 2021
Given a preorder sequence of the binary search tree of N nodes. The task is to find its leftmost and rightmost nodes.Examples:Input : N = 5, preorder[]={ 3, 2, 1, 5, 4 }Ou...
read more
Tree
Preorder Traversal
Searching
Binary Search Trees
DSA
1
2
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !