Skip to content

Category Archives: Binary Search Tree

Total number of possible Binary Search Trees with n different keys (countBST(n)) = Catalan number Cn = (2n)! / ((n + 1)! * n!) For… Read More
A binary search tree (BST) is a node based binary tree data structure which has the following properties. • The left subtree of a node contains… Read More
This is quite simple. Just traverse the node from root to left recursively until left is NULL. The node whose left is NULL is the… Read More
Given values of two values n1 and n2 in a Binary Search Tree, find the Lowest Common Ancestor (LCA). You may assume that both the… Read More