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

# Tag Archives: BST

Given a string S of length N, and Q queries of the following type: Type 1: 1 i X Update the i-th character of the… 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 binary search tree containing N distinct nodes and a value K. The task is to count pairs in the given binary search tree… Read More

Construct the BST (Binary Search Tree) from its given level order traversal. Examples: Input : {7, 4, 12, 3, 6, 8, 1, 5, 10} Output… Read More

Given a binary search tree. The task is to print all even nodes of the binary search tree. Examples: Input : 5 / \ 3… Read More

Given N elements to be inserted into Binary Search Tree. The task is to construct a binary search tree with only insert operation and finally… Read More

Given N, Find the total number of unique BSTs that can be made using values from 1 to N. Examples: Input: n = 3 Output:… Read More

Given a BST and a key. The task is to find the inorder successor and predecessor of the given key. In case, if either of… Read More

Given an array representing preorder traversal of BST, print its postorder traversal. Examples: Input : 40 30 35 80 100 Output : 35 30 100… 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 of all greater keys in BST