Skip to content

Category Archives: Graph

The lollipop graph consists of 2 components a complete graph called clique and a path graph. More precisely L (m ,n)  is a graph with… Read More
A cycle graph is a graph which contains a single cycle in which all nodes are structurally equivalent therefore starting and ending nodes cannot be… Read More
Given an integer N, the task is to count the number of N-length strings consisting of lowercase vowels that can be generated based the following… Read More
It is a graph with 46 vertices and 69 edges. It is important because it is an exception to Tait’s conjecture which states that every… Read More
An incidence matrix is simply a matrix that contains information about the relationship between objects (or instances) of any two classes. The rows of the… Read More
Given an undirected graph with N vertices and N edges that contain only one cycle, and an array arr[] of size N, where arr[i] denotes… Read More
Given an array weights[] consisting of N positive integer, where weights[i] denotes the weight of ith node, the task is to construct an N-ary tree… Read More
Given a string S of size N and a positive integer K ( where N % K = 0), the task is to find the… Read More
Given two arrays arr[] and jumps[] consisting of N positive integers, the task for each array element arr[i] is to find the minimum number of… Read More
Given a Binary Tree consisting of N nodes and two integers R and K. Each edge of the tree has a positive integer associated with… Read More
Given a 2D array houses[][] consisting of N 2D coordinates {x, y} where each coordinate represents the location of each house, the task is to… Read More
Tarjan’s Algorithm: The Tarjan’s Algorithm is an efficient graph algorithm that is used to find the Strongly Connected Component(SCC) in a directed graph by using… Read More
Given an array arr[] consisting of N characters, the task is to generate a graph of N nodes and (N – 1) Edges such that… Read More
Given a directed graph G N nodes and E Edges consisting of nodes valued [0, N – 1] and a 2D array Edges[][2] of type… Read More
Optimized Longest Path Problem: The optimized longest path problem states that given a graph G, of a set of vertices V and edges E, the… Read More