# Category Archives: Binary Search Tree

Given an array A[ ] consisting of N distinct integers, the task is to find the number of elements which are strictly greater than allโฆ Read More
Given an unbalanced Binary Search Tree (BST), the task is to convert it into a balanced BST in linear time and without using auxiliary space.โฆ Read More
Given an unsorted vector arr, the task is to create a balanced binary search tree using the elements of the array. Note: There can beโฆ Read More
Given a matrix mat[][] and an integer K, the task is to find the length of the shortest path in a matrix from top-left toโฆ Read More
Given an infinite stream of integers, find the k’th largest element at any point of time.Example:  Input:stream[] = {10, 20, 11, 70, 50, 40, 100,โฆ Read More
Given an infinite stream of integers, find the k’th largest element at any point of time.Example:  Input: stream[] = {10, 20, 11, 70, 50, 40,โฆ Read More
AVL Tree is a self-balancing Binary Search Tree (BST) where the difference between heights of left and right subtrees cannot be more than one forโฆ Read More
Given a Binary Search Tree consisting of N distinct nodes, the task is to flatten the given Binary Search Tree to convert the tree intoโฆ Read More
Given a Binary Search Tree, the task is to create a wave array from the given Binary Search Tree. An array arr[0..n-1] is called aโฆ Read More
Given a Binary Search Tree, a target node in the BST, and an integer value K, the task is to find the sum of allโฆ Read More
Given a world map in the form of Generic M-ary Tree consisting of N nodes and an array queries[], the task is to implement theโฆ Read More
A Set is a collection of distinct elements. Elements cannot be modified once added. There are various operations associated with sets such as union, intersection,โฆ Read More
AVL Trees are self-balancing Binary Search Trees where the difference between heights of left and right subtrees cannot be more than one for all nodes.โฆ Read More
Given an array arr[] consisting of N distinct integers, the task is to print for each array element, all the greater elements present on itsโฆ Read More
Given a Binary Search Tree (BST)consisting of N nodes and two nodes A and B, the task is to find the median of all theโฆ Read More