Skip to content

Category Archives: Graph

Given a 2D array arr[] and value K, where each list in arr[] represents a point on Cartesian coordinates, the task is to group the… Read More
Given N nodes, where each of them is numbered from 0 to N – 1, and array edges, where there is a directed edge from… Read More
Given a 2-D array A[][] of size N×3, where each element of the array consists of {x, y, r}, where x and y are coordinates… Read More
Generally, when we come across a graph problem, we might need to traverse the structure of the given graph or tree to find our solution… Read More
Given an undirected graph with V vertices in the form of an adjacency matrix, the weight of any two edges cannot be the same. For… Read More
Given a weighted directed graph with N vertices and M edges, a source src and a destination target, the task is to find the shortest… Read More
A Data Structure organizes and stores data in a computer so that we can perform operations on the data more efficiently. There are many diverse… Read More
A clique is a collection of vertices in an undirected graph G such that every two different vertices in the clique are nearby, implying that… Read More
Given a directed graph with N nodes and M connections shown in the matrix mat[] where each element is of the form {xi, yi} denoting… Read More
Prerequisite: NP-Completeness, NP Class, Sparse Graph, Independent Set Problem: Given graph G = (V, E) and two integers a and b. A set of a… Read More
Given a set of cities and the distance between every pair of cities, the problem is to find the shortest possible route that visits every… Read More
Prerequisite: NP-Completeness, NP Class, Clique, Independent Set Problem: Given an undirected graph G = (V, E) and an integer K, determine if a clique of… Read More
Prerequisites: NP-Completeness, NP Class, Dense Subgraph  Problem: Given graph G = (V, E) and two integers a and b. A set of a number of… Read More
What is Data Structure: A data structure is a storage that is used to store and organize data. It is a way of arranging data… Read More
A weighted graph is a special type of graph in which the edges are assigned some weights which represent cost, distance and many other relative… Read More

Start Your Coding Journey Now!