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

# Category Archives: Graph

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

Subset Equality Problem: Given a set S of non-negative integer values, the problem is to identify if there is a partition of the set S… Read More

Given an integer N, the task is to find the number of permutations of integers from the range [1, N] that can form an acyclic… Read More

Prerequisite: NP-Completeness, Graph Coloring Graph K-coloring Problem: A K-coloring problem for undirected graphs is an assignment of colors to the nodes of the graph such… Read More

Set partition problem: Set partition problem partitions an array of numbers into two subsets such that the sum of each of these two subsets is… Read More

Given a graph G consisting of nodes valued [0, N – 1], a source S, and an array Edges[][3] of type {u, v, w} that… Read More

Given a weighted undirected graph T consisting of nodes valued [0, N – 1] and an array Edges[][3] of type {u, v, w} that denotes… Read More

Prerequisite: Introduction to Social Networks In Social Networks, Network is of 2 types- Unsigned Network and Signed Network. In the unsigned network, there are no… Read More

Prerequisite: Page Rank Algorithm and Implementation, Random Walk In Social Networks page rank is a very important topic. Basically page rank is nothing but how… Read More

Prerequisite: Introduction to Social Networks, Erdos-Renyi Model Erdos Renyi model is used to create random networks or graphs on social networking. In the Erdos Reny… Read More

Prerequisite: Introduction to Social Networks K-shell decomposition is the method in which we can divide nodes on the basis of the number of its degree… Read More