Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.4K+ articles
Misc
7.7K+ articles
Tree
911+ articles
Binary Search Tree
166+ articles
Tree Traversals
106+ articles
tree-traversal
88+ articles
Inorder Traversal
43+ articles
AVL-Tree
23+ articles
Binary Search Trees
18+ articles
BST
25 posts
Recent Articles
Popular Articles
Sum of Descendant Nodes Below Target in Binary Search Tree
Last Updated: 23 July 2025
Given a Binary Search Tree with unique node values and a target value. You have to find the node whose data is equal to the target and return the sum of all descendant (of...
read more
Binary Search Tree
Geeks Premier League
DSA
BST
Geeks Premier League 2023
Find maximum product of K integers in a Binary Search Tree
Last Updated: 23 July 2025
Given a Binary search tree(BST) and a positive integer K, find the maximum product of k integers in the tree. Return the product as an integer.Examples:Input: K = 3, ...
read more
Binary Search Tree
DSA
BST
Data Structures-Binary Search Trees
Find two nodes in the BST whose product equals to the target value
Last Updated: 23 July 2025
Given a binary search tree (BST) and a target value, find two nodes in the BST such that their product equals the given target value. Return an empty array if no such pair...
read more
Binary Search Tree
DSA
BST
Count distinct element in a BST
Last Updated: 23 July 2025
Given a binary search tree (BST), the task is to count the number of distinct elements present in it.Examples:Input: 5 / \ 3 7/ \ / \2 4 6 8Output : 7Explanati...
read more
Tree
Binary Search Tree
DSA
BST
Find next smaller element in Binary Search Tree
Last Updated: 23 July 2025
Given a binary search tree and a target value, the task is to find the next smaller element of the target value in the binary search tree.Examples :Input: 8 / \ 3 ...
read more
Tree
Binary Search Tree
DSA
BST
Find Next greater element in Binary Search Tree
Last Updated: 28 August 2023
Given a binary search tree and a target value, the task is to find the next greater element of the target value in the binary search tree.Examples:Input: 5 / \...
read more
Tree
Binary Search Tree
DSA
BST
Difference between Binary Search Tree and AVL Tree
Last Updated: 23 July 2025
Binary Search Tree:A binary Search Tree is a node-based binary tree data structure that has the following properties:The left subtree of a node contains only nodes with ke...
read more
Tree
Binary Search Tree
DSA
BST
AVL-Tree
Create a balanced BST using vector in C++ STL
Last Updated: 23 July 2025
Given an unsorted vector arr, the task is to create a balanced binary search tree using the elements of the array.Note: There can be more than one balanced BST. Forming an...
read more
C++
Algo-Geek 2021
BST
STL
cpp-vector
Flatten a Binary Search Tree to convert the tree into a wave list in place only
Last Updated: 23 July 2025
Given a Binary Search Tree consisting of N distinct nodes, the task is to flatten the given Binary Search Tree to convert the tree into a wave list. A wave list arr[0..n-1...
read more
Tree
Binary Search Tree
DSA
Inorder Traversal
BST
tree-traversal
Tree Traversals
Create a wave array from the given Binary Search Tree
Last Updated: 23 July 2025
Given a Binary Search Tree, the task is to create a wave array from the given Binary Search Tree. An array arr[0..n-1] is called a wave array if arr[0] = arr[1] = arr[2] =...
read more
Tree
Mathematical
Binary Search Tree
DSA
Arrays
Inorder Traversal
BST
tree-traversal
Tree Traversals
How to insert Strings into an AVL Tree
Last Updated: 23 July 2025
AVL Tree is a self-balancing Binary Search Tree (BST) where the difference between heights of left and right subtrees cannot be more than one for all nodes.Examples:The ab...
read more
Tree
Binary Search Tree
DSA
BST
AVL-Tree
Self-Balancing-BST
Implementation of AVL Tree using graphics in C++
Last Updated: 23 July 2025
AVL Trees are self-balancing Binary Search Trees where the difference between heights of left and right subtrees cannot be more than one for all nodes. Below is the exampl...
read more
C++
BST
AVL-Tree
Self-Balancing-BST
computer-graphics
c-graphics
Count of BSTs with N nodes having height at least K
Last Updated: 23 July 2025
Given two positive integers N and K, the task is to find the number of binary search trees (BST) with N nodes of height greater than or equal to K.Note: Here height refers...
read more
Misc
Tree
Recursion
DSA
BST
Sum of BST Nodes Within a Given Range
Last Updated: 11 October 2025
Given the root of a Binary Search Tree containing n nodes, and two integers l and r, find the sum of all node values that lie within the inclusive range [l, r].Examples:In...
read more
Misc
Tree
Queue
Searching
DSA
BST
Tree Traversals
Binary Search Trees
tree-level-order
Iterative approach to check if a Binary Tree is BST or not
Last Updated: 23 July 2025
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
Stack
DSA
Inorder Traversal
Binary Tree
BST
Binary Search Trees
1
2