## Print BST keys in given Range | O(1) Space

Given two values n1 and n2 (where n1 < n2) and a root pointer to a Binary Search Tree. Print all the keys of tree… Read More »

Quick Links for Binary Search Tree

Quizzes on BST |

Quizzes on Balanced BST |

Given two values n1 and n2 (where n1 < n2) and a root pointer to a Binary Search Tree. Print all the keys of tree… Read More »

Given a Binary Search Tree(BST), convert it to a Binary Tree such that every key of the original BST is changed to key plus sum… Read More »

Given a binary search tree and a key, your task to reverse path of the binary tree. Prerequisite : Reverse path of Binary tree Examples… Read More »

Euler tour tree (ETT) is a method for representing a rooted tree as a number sequence. When traversing the tree using Depth for search(DFS), insert… Read More »

Given a binary search tree, task is to find Kth largest element in the binary search tree. Input : k = 3 Root of following… Read More »

Given a Binary Search Trees, task is to count the number of nodes which are having special two digit numbers. Prerequisite : Special Two Digit… Read More »

Given a Binary Tree, convert it to a Binary Search Tree. The conversion must be done in such a way that keeps the original structure… Read More »

Given a stream of integers, lookup the rank of a given integer x. Rank of an integer in stream is “Total number of elements less… Read More »

Given an array of size n, the task is to find whether array can represent a BST with n levels. Since levels are n, we… Read More »

Given a Binary Search Tree that contains positive integer values greater than 0. The task is to check whether the BST contains a dead end… Read More »

Given a BST and a sum, find if there is a pair with given sum. Input : sum = 28 Root of below tree Output… Read More »

Given a binary search tree and a key. Check the given key exist in BST or not without recursion. Recommended: Please try your approach on… Read More »

We have a binary search tree and a number N. Our task is to find the greatest number in the binary search tree that is… Read More »

Given an array and an integer K. We need to find the maximum of every segment of length K which has no duplicates in that… Read More »

In this article we will see that how to calculate number of elements which are greater than given value in AVL tree. Examples: Input :… Read More »