## Duplicate subtree in Binary Tree | SET 2

Given a binary tree, the task is to check whether the binary tree contains a duplicate sub-tree of size two or more. Input: A /… Read More »

## Find the first N pure numbers

Given an integer N, the task is to print first Nth pure numbers. A number is said to be pure if It has even number… Read More »

## Count number of ways to reach destination in a Maze using BFS

Given a maze with obstacles, count number of paths to reach rightmost-bottom most cell from the topmost-leftmost cell. A cell in the given maze has… Read More »

## Find the maximum cost path from the bottom-left corner to the top-right corner

Given a two dimensional grid, each cell of which contains integer cost which represents a cost to traverse through that cell. The task is to… Read More »

## Python | Queue using Doubly Linked List

A Queue is a collection of objects that are inserted and removed using First in First out Principle(FIFO). Insertion is done at the back(Rear) of… 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 »

## 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 »

## Sort the Queue using Recursion

Given a queue and the task is to sort it using recursion without using any loop. We can only use the following functions of queue:… Read More »

## Minimum operations required to make every element greater than or equal to K

Given an array of length N. The task is to convert it into a sequence in which all elements are greater than or equal to… Read More »

## Rearrange numbers in an array such that no two adjacent numbers are same

Given an array of integers. The task is to rearrange elements of the array such that no two adjacent elements in the array are same.… Read More »

## Density of Binary Tree using Level Order Traversal

Given a Binary Tree, find the density of it by doing one traversal of it. The density of binary tree is defined as: Density of… Read More »

## Print all the nodes except the leftmost node in every level of the given binary tree

Given a binary tree, the task is to print all the nodes except the leftmost in every level of the tree. The root is considered… Read More »

## Minimum steps required to reach the end of a matrix | Set 2

Given a 2d-matrix mat[][] consisting of positive integers, the task is to find the minimum number of steps required to reach the end of the… Read More »

## Smallest multiple of N formed using the given set of digits

Given a set of digits S and an integer N, the task is to find the smallest positive integer if exists which contains only the… Read More »