Skip to content

Category Archives: Graph

Given an undirected graph G with vertices numbered in the range [0, N] and an array Edges[][] consisting of M edges, the task is to… Read More
Given two positive integers N and K, the task is to construct a simple and connected graph consisting of N vertices with the length of… Read More
Prerequisite: networkx There are many kinds of definitions of the barbell graphs. The most commonly used one is an n-barbell graph which is a simple… Read More
Prerequisites: Networkx NetworkX is a Python language software package for the creation, manipulation, and study of the structure, dynamics, and function of complex networks. It… Read More
In this article, we are going to see the ladder graph using Python. It is a graph that looks like ladders used commonly with every… Read More
The lollipop graph consists of 2 components a complete graph called clique and a path graph. More precisely L (m ,n)  is a graph with… Read More
A cycle graph is a graph which contains a single cycle in which all nodes are structurally equivalent therefore starting and ending nodes cannot be… Read More
Given an integer N, the task is to count the number of N-length strings consisting of lowercase vowels that can be generated based the following… Read More
It is a graph with 46 vertices and 69 edges. It is important because it is an exception to Tait’s conjecture which states that every… Read More
An incidence matrix is simply a matrix that contains information about the relationship between objects (or instances) of any two classes. The rows of the… Read More
Given an undirected graph with N vertices and N edges that contain only one cycle, and an array arr[] of size N, where arr[i] denotes… Read More
Given an array weights[] consisting of N positive integer, where weights[i] denotes the weight of ith node, the task is to construct an N-ary tree… Read More
Given a string S of size N and a positive integer K ( where N % K = 0), the task is to find the… Read More
Given two arrays arr[] and jumps[] consisting of N positive integers, the task for each array element arr[i] is to find the minimum number of… Read More
Given a Binary Tree consisting of N nodes and two integers R and K. Each edge of the tree has a positive integer associated with… Read More

Start Your Coding Journey Now!