## Find the maximum node at a given level in a binary tree

Given a Binary Tree and a Level. The task is to find the node with the maximum value at that given level. Recommended: Please try… Read More »

Given a Binary Tree and a Level. The task is to find the node with the maximum value at that given level. Recommended: Please try… Read More »

Given a tree of N nodes and N-1 edges. Also given an integer M and a node, the task is to print the M-th node… Read More »

Given a tree of N nodes and N-1 edges. The task is to print the DFS of the subtree of a given node for multiple… Read More »

Given an undirected graph, print all the vertices that form cycles in it. Pre-requisite: Detect Cycle in a directed graph using colors In the above… Read More »

Given a graph, the task is to print the DFS traversal of a graph which includes the every step including the backtracking. 1st step:- 0… Read More »

Given an array of words, find any alphabetical order in the English alphabet such that the given words can be considered sorted (increasing), if there… Read More »

Graphs can be used for seemingly unconnected problems. Say the problem of cards which have numbers on both side and you try to create a… Read More »

Given a connected graph, check if the graph is bipartite or not. A bipartite graph is possible if the graph coloring is possible using two… Read More »

Given n nodes of a tree and their connections, print Subtree nodes of every node. Subtree of a node is defined as a tree which… Read More »

Given an array A of N numbers where Ai represent the value of the (i+1)th node. Also given are M pair of edges where u… Read More »

Permutation A permutation is an arrangement of elements. A permutation of n elements can be represented by an arrangement of the numbers 1, 2, …n… Read More »

Given a set of ‘n’ vertices and ‘m’ edges of an undirected simple graph (no parallel edges and no self-loop), find the number of single-cycle-components… Read More »

Consider a tree with n nodes and root. You can jump from one node to any other node on the same height a maximum of… Read More »

Given a tree and weights of nodes. Weights are non-negative integers. Task is to find maximum size of a subtree of a given tree such… Read More »

Given a graph with N nodes numbered from 1 to N and M edges and an array of numbers from 1 to N. Check if… Read More »