Skip to content

Tag Archives: Binary Search Trees

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… Read More
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… Read More
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… Read More
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.… Read More
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… Read More
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… Read More
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… Read More
Given a preorder sequence of the binary search tree of N nodes. The task is to find its leftmost and rightmost nodes. Examples:  Input :… Read More
Given a Binary Search Tree and an integer sum, the task is to find all the pairs from the tree whose sum is equal to… Read More
Given a binary search tree and a number N, the task is to find the sum of the cousins of the given node N if… Read More
Given a Binary Search Tree and a number N, the task is to find the smallest number in the binary search tree that is greater… Read More
Given a BST, the task is to find the sum of all elements greater than or equal to K-th largest element in O(1) space.Examples:  Input… Read More
Given a Binary Search Trees, the task is to count the number of nodes which are having special two-digit numbers.Prerequisite : Special Two Digit Number… Read More
Consider the same code as given in above question. What does the function print() do in general? The function print() receives root of a Binary… Read More