Skip to content

Category Archives: Graph

Prerequisite- Introduction to Social Networks, Barabasi Albert Graph In social networks, there is a phenomenon called Rich getting Richer also known as Preferential Attachment. In… Read More
Given an undirected graph G with N nodes, M edges, and an integer K, the task is to find the maximum count of edges that… Read More
Given a Tree consisting of N nodes valued in the range [0, N) and an array Queries[] of Q integers consisting of values in the… Read More
Given an undirected graph with N vertices and K edges, the task is to check if for every combination of three vertices in the graph,… Read More
Given two integers N and E which denotes the number of nodes and the number of edges of an undirected graph, the task is to… Read More
Given a connected acyclic graph consisting of V vertices and E edges, a source vertex src, and a destination vertex dest, the task is to… Read More
Given a matrix arr[][] of dimensions N * M, having elements 0, 1, and 2. There is only one cell with value 1 present in… Read More
Given two strings start and target(both of the same length) and a list of strings str[], the task is to print all possible smallest sequences… Read More
Given an undirected graph G, with V vertices and E edges, the task is to check whether the graph is 2-edge connected or not. A… Read More
Given two arrays A[] and B[] consisting of N positive integers and a matrix List[][] consisting of M pairs of indices, the task is to… Read More
Given an Undirected Connected Graph in the form of a tree consisting of N nodes and (N – 1) edges, the task for each edge… Read More
Given two natural numbers N and M, Create a graph using these two natural numbers using relation that a number is connected to its largest… Read More
Dijkstra’s algorithm is one of the most popular algorithms for solving many single-source shortest path problems having non-negative edge weight in the graphs i.e., it… Read More
Given a Directed Acyclic Graph having V vertices and E edges, where each edge {U, V} represents the Jobs U and V such that Job… Read More
Given a binary matrix mat[][] of dimensions NxM such that 1 denotes the island and 0 denotes the water. The task is to find the… Read More

Start Your Coding Journey Now!