## B*-Trees implementation in C++

B*-tree of order m is a search tree that is either empty or that satisfies three properties: The root node has minimum two and maximum… Read More »

## Kth smallest element in a subarray

Given an array arr of size N. The task is to find the kth smallest element in the subarray(l to r, both inclusive). Note :… Read More »

## Print Binary Search Tree in Min Max Fashion

Given a Binary Search Tree (BST), the task is to print the BST in min-max fashion. What is min-max fashion? A min-max fashion means you… Read More »

## Find maximum and minimum element in binary tree without using recursion or stack or queue

Given a binary tree. The task is to find out the maximum and minimum element in a binary tree without using recursion or stack or… Read More »

## Burn the binary tree starting from the target node

Given a binary tree and target node. By giving the fire to the target node and fire starts to spread in a complete tree. The… Read More »

## Introduction to Data Structures | 10 most commonly used Data Structures

A data structure is a particular way of organizing data in a computer so that it can be used effectively. The idea is to reduce… Read More »

## Sum of the distances from every node to all other nodes is maximum

Given a tree with N nodes and N-1 edges with root at 1 and given an array of N-1 integers. The task is to assign… Read More »

## Reverse tree path using Queue

Given a tree and a node, the task is to reverse the path till the given Node and print the in-order traversal of the modified… Read More »

## Find the color of given node in an infinite binary tree

Given an infinitely long binary tree having a pattern as below: 1 / \ 2 3 / \ / \ 4 5 6 7 /… Read More »

## Check if the given n-ary tree is a binary tree

Given an n-ary tree, the task is to check whether the given tree is binary or not. Examples: Input: A / \ B C /… Read More »

## Find Leftmost and Rightmost node of BST from its given preorder traversal

Given a preorder sequence of the binary search tree of N nodes. The task is to find its leftmost and rightmost node. Examples: Input :… Read More »

## Implementing Backward Iterator in BST

Given a Binary search tree, the task is to implement backward iterator on it with the following functions. curr(): returns the pointer to current element.… Read More »

## Number of pairs with a given sum in a Binary Search Tree

Given a Binary Search Tree, and a number X. The task is to find the number of distinct pairs of distinct nodes in BST with… Read More »

## Find the minimum absolute difference in two different BST’s

Given 2 Binary Search Trees, select one node from each tree such that their absolute difference is minimum possible. Assume each BST has at-least one… Read More »

## Construct BST from its given level order traversal | Set-2

Construct the BST (Binary Search Tree) from its given level order traversal. Examples: Input : {7, 4, 12, 3, 6, 8, 1, 5, 10} Output… Read More »