## Left-Right traversal of all the levels of N-ary tree

Given a Complete Binary Tree rooted at node 1, the task is to print the elements in the following defined order. First, print all elements… Read More »

- Coin Change | BFS Approach
- Find the minimum number of moves to reach end of the array
- Burn the binary tree starting from the target node
- Count number of ways to reach destination in a Maze using BFS
- Implementation of BFS using adjacency matrix
- Find K vertices in the graph which are connected to at least one of remaining vertices
- Find the first N pure numbers
- Count of numbers in the range [L, R] which satisfy the given conditions
- Duplicate subtree in Binary Tree | SET 2

Given a Complete Binary Tree rooted at node 1, the task is to print the elements in the following defined order. First, print all elements… Read More »

Given a tree with N vertices numbered from 0 to N – 1 and Q queries containing nodes in the tree, the task is to… Read More »

Given a tree with N vertices numbered from 0 to N – 1 and Q query containing nodes in the tree, the task is to… Read More »

Given a dictionary, and two words start and target (both of the same length). Find length of the smallest chain from start to target if… Read More »

Breadth First Search (BFS) has been discussed in this article which uses adjacency list for the graph representation. In this article, adjacency matrix will be… Read More »

Given an array arr[] of size N where every element is from the range [0, 9]. The task is to reach the last index of… Read More »

Given a range [L, R], the task is to find the count of numbers from this range that satisfy the below conditions: All the digit… Read More »

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 »

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 »

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 »

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 »

Given a connected graph with N vertices. The task is to select k(k must be less than or equals to n/2, not necessarily minimum) vertices… Read More »

Given an integer X and an array arr[] of length N consisting of positive integers, the task is to pick minimum number of integers from… Read More »

Breadth First Search BFS stands for Breadth First Search is a vertex based technique for finding a shortest path in graph. It uses a Queue… Read More »

Given two strings s1 and s2 of same length, the task is to count the minimum number of pairs of characters (c1, c2) such that… Read More »