Skip to content

Category Archives: Binary Search Tree

Given a Binary Search Tree, The task is to print the elements in inorder, preorder, and postorder traversal of the Binary Search Tree.  Input:  A… Read More
Given a binary tree and a target K, the task is to find the diameter of the minimum subtree having sum equal to K which… Read More
A Data Structure organizes and stores data in a computer so that we can perform operations on the data more efficiently. There are many diverse… Read More
Binary Search Tree (BST) is a special binary tree that has the properties:  The left subtree contains only the keys which are lesser than the… Read More
Given a Binary search tree having N nodes, the task is to find all the paths starting at the root and ending at any leaf… Read More
Given two integers N and H, the task is to find the count of distinct Binary Search Trees consisting of N nodes where the maximum… 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,… 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

Start Your Coding Journey Now!