In graph theory, a partial k-tree (also known as a partial k-tree decomposition) is a graph-theoretic model that can be used to represent and solve… Read More
Category Archives: Graph
In graph theory, a clique is a subset of vertices of an undirected graph such that every two distinct vertices in the clique are adjacent,… Read More
Given a graph with n nodes and m edges, each edges[i] = [u, v, weight] and d as the maximum distance to reach the neighbor… Read More
Given an undirected graph, the task is to if adding an edge makes the graph cyclic or not. In an Undirected graph, a cycle is… Read More
What is Hypergraph? A hypergraph is a generalization of a graph, where an edge can connect any number of vertices. In a hypergraph, each edge… Read More
Given an undirected graph with N nodes (numbered from 0 to N-1) such that any node can be reached from any other node and there… Read More
Given a grid of size N * M consisting of O’s and X’s. The task is to find the number of ‘X’ total shapes. Note:… Read More
Given a set of 109 nodes. There are N bidirectional connections, and ith connection connects the Aith and Bith nodes. Starting from the first node,… Read More
A graph is a type of non-linear data structure that has two types of components “Vertices” (nodes) and “edges”. It contains a set of vertices… Read More
Given an undirected graph with V vertices and E edges and a node X, The task is to find the level of node X in… Read More
Given the adjacency list of a bidirectional graph. The task is to copy/clone the adjacency list for each vertex and return a new list for… Read More
Groups, subgroups, rings, fields, integral domains, graphs, trees, cut sets, etc are one of the most important concepts in Discrete Mathematics. In this article, we… Read More
There are N persons and N jobs. Given an array arr[] of size N*N where (arr[0], arr[1], . . ., arr[N-1]) denotes the time taken… Read More
Given a 2D array arr[][], where arr[i] = [Ai, Bi] means there exists a direct path going from country Ai to country Bi, the task… Read More
What is Boost Graph? The Boost Graph (BG) are multi-graph concept, it is factored into much smaller pieces. The reason for this is that any… Read More