Abhinaw TripathiJun 2, 20162 minBinary Tree to Binary Search Tree ConversionFollowing is a 3 step solution for converting Binary tree to Binary Search Tree. 1) Create a temp array arr[] that stores inorder...
Abhinaw TripathiJun 2, 20161 minFind k-th smallest element in BST (Order Statistics in BST)Solution Approach: By using In order traversal of BST retrieves elements of tree in the sorted order. The in order traversal uses stack...
Abhinaw TripathiJun 2, 20161 minTotal number of possible Binary Search Trees with n keys?Solution Approach: Before going deeper,we should know about Catlan Number. Here it is: Total number of possible Binary Search Trees...
Abhinaw TripathiJun 2, 20161 minHow to check if a Binary Tree is BST or not?What is Binary Search Tree(BST)? A binary search tree (BST) is a node based binary tree data structure. Must have these Properties: ...