Skip to content

Tag Archives: Binary Search Trees

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 Tree and a positive integer K. The task is to check whether the Balanced BST of size K exists in a given… 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 node. 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
Consider the following code snippet in C. The function print() receives root of a Binary Search Tree (BST) and a positive integer k as arguments.… Read More
Which of the following traversals is sufficient to construct BST from given traversals 1) Inorder 2) Preorder 3) Postorder (A) Any one of the given… Read More