Skip to content

Category Archives: Graph

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
An unweighted graph is a graph in which the edges do not have weights or costs associated with them. Instead, they simply represent the presence… Read More
Given a directed graph with N nodes and M edges in array V[], the task is to find the number of nodes that are accessible… Read More
Directed graphs are graphs that have directed edges between the nodes. If a directed edge points from u to v then, v is adjacent to… Read More
Graph is a non-linear data structure that contains nodes (vertices) and edges. A graph is a collection of set of vertices and edges (formed by… Read More
Given an integer N and an array arr[] of M pairs of type (Ai, Bi), the task is to generate the lexicographically smallest possible permutation… Read More
Given two integers N and X, the task is to convert 1 to N using minimum operations of any of the following operations: Change a… Read More
Geek is in a maze of size N * M. Each cell in the maze is made of either ‘.’ or ‘#’. An empty cell… Read More
Given N vertices numbered from 0 to N – 1 and E edges to form an undirected graph. All the edges should be added in… Read More
Given a connected acyclic graph with N nodes numbered from 1 to N and N-1 edges, find out the pair of nodes that are at… Read More
Given an undirected graph g, the task is to find the number of coalitions formed in it after the removal of Q vertices and maximum… Read More
Given a tree of N nodes, the task is to find the maximum number of edges that can be added to the tree such that… Read More

Start Your Coding Journey Now!