Binary Seach Tree

 A binary search tree is a binary tree (contains only two nodes). The left subtree is less than or equal to the parent node and right subtree is greater than or equal to the parent node. The binary search tree support insert, delete search and traversal operations. It is very efficient for searching and sorting algorithms. The shape of the binary tree depends on the order of insertion. Binary Search Tree section explain how to implement the Binary Search Tree and various applications related with tree operation.
 66 Implement BST Binary search tree is a binary tree (contains only two nodes). The left subtree is less than or equal to the parent node and right subtree is greater than or equal to the parent node. 67 Find Minimum Write a program to find minium value from given binary search tree. 68 Convert Sorted Array to BST Write a program to convert the sorted array to the binary search tree. The left subtree is less than or equal to the parent node and right subtree is greater than or equal to the parent node. 69 Find Minimum Value using BST Write a program to find minimum value from given binary search tree. 70 Inorder Successor in Binary Search Tree The inorder successor of a node is the next node in Inorder traversal of the Binary Tree. Inorder Successor is NULL for the last node in Inorder traversal. 71 Insert and Delete in BST Write a program to insert and delete the item from the binary search tree. If the inserted element is less than or equal to the parent node, insert the element into the left tree. If the inserted element is greater than or equal to parent node, insert into the right subtree. 72 Merge two BST Write a program to Merge two binary search tree. 73 Validate BST Write a program to validate the binary search tree. If it is valid to search tree returns true; else return false 74 Lowest Common Ancestor Write a program to find the least common ancestor (LCA) from given a binary tree and two values say n1 and n2. 75 Find k-th smallest element Write a program to find the smallest item from given Binary search tree. 76 Print BST keys in the given range Write a program to Print Binary search Tree nodes in the given range. 77 Find Largest BST in a Tree Write a program to find largest binary search tree in given tree. 78 Check for Identical BSTs Write a program to check whether given two Binary search tree is identical or not. 79 Add all greater values to every node in a given BST Given a Binary Search Tree, modify it so that all greater values in the given BST are added to every node 80 Remove BST keys outside the given range Write a program to remove the binary search tree nodes outside the given range. 81 Check internal node of a BST has exactly one child Check the given binary search tree internal node has exactly node child 83 Merge two BSTs with limited extra space Write a program to merge two Binary search Tree with limited extra space. 84 Two nodes of a BST are swapped Write a program to swap two nodes from Binary Search tree. 85 Print All paths Write a program to print all the paths from root node to leaf nodes. 86 Print all the elements from BST Write a program to print all the node values from binary search tree 87 Floor and Ceil from a BST Write a program to find ceil and floor values in given binary search tree 88 Convert a BST to a Binary Tree Write a program to convert Binary Search Tree to Binary tree 89 Sorted Linked List to Balanced BST Write a program to convert sorted singly Linked list to Balanced Binary search tree. 90 In-place conversion of Sorted DLL to Balanced BST Convert from In-place conversion of Sorted doubly linked list to Balanced Binary search Tree 91 Find a pair with given sum in a Balanced BST Write a program to find a pair with given sum in a balanced binary search tree. 92 Binary Tree to BST Conversion Write a program to convert Binary Tree to Binary Search Tree. The binary search tree left side node values are less than or equal to the parent node and right side node values are greater than or equal to the parent node. 93 Transform a BST to greater sum tree Write a program to convert Binary Search Tree to Greater sum tree 94 Inorder predecessor and successor for a given key in BST Write a program to find Inorder predecessor and successor for a given node in Binary Search Tree 95 Print the BST using InOrder, PreOrder Write a program to print all the values from Binary Search Tree. Traverse the binary tree using InOrder and PreOrder traversal. 96 BST to LinkedList Write a program to convert from Binary Search Tree to Linked list. 97 Print all BST sum Write program to print sum of all nodes in the binary search tree.