Max value node between two elements of BST

Given an array of integers that represent values of nodes in a Binary Search Tree. For example, If the given array is {9, 4, 17, […]

Check if a Binary Tree is Binary Search Tree

Given a Binary Tree, write code to check if it is Binary Search Tree or not ? Binary search tree is a binary tree with […]

Convert a Binary Tree to Binary Search Tree

Given a Binary Tree, write code to convert it to Binary Search Tree such that the structure of the tree remains the same. For example: […]

Lowest Common Ancestor in Binary Search Tree

In a Binary Search Tree, you are given the values of two nodes. Write a code which will return the Lowest Common Ancestor of both […]

check if all nodes of a tree has only one child

Given the PreOrder traversal of a binary search tree (in the form of a tree), check if all the nodes (except the last) of the […]

Node with maximum value in a Binary search tree

Earlier, we have seen how to find the minimum element in a Binary Search Tree. Write a function which will return the maximum value in […]

Node with minimum value in a Binary Search Tree

Given a Binary Search Tree (BST), where will you find the node containing minimum value in the Tree? For example: If the tree is as […]