## Multi-threaded programming in Python

Thread class in python is used to define and control an activity. Each of these activities are parts of the program that are executed concurrently… Read More »

- Detect Cycle in a Directed Graph using BFS
- Dijkstra's shortest path with minimum edges
- Check if it is possible to reach a number by making jumps of two given length
- Maximum number of edges among all connected components of an undirected graph
- Difference between graph and tree
- Jump Pointer Algorithm
- Graph Types and Applications
- Find the ordering of tasks from given dependencies
- Minimum steps required to convert X to Y where a binary matrix represents the possible conversions
- Shortest Path using Meet In The Middle
- Edge Coloring of a Graph
- Number of Walks from source to destination
- Find whether it is possible to finish all tasks or not from given dependencies
- Minimum number of edges between two vertices of a graph using DFS
- Unique paths covering every non-obstacle block exactly once in a grid
- Find maximum path length in a binary matrix
- Minimum spanning tree cost of given Graphs
- Number of Isosceles triangles in a binary tree
- Finding the path from one vertex to rest using BFS
- Cost of painting n * m grid
- Count the number of nodes at a given level in a tree using DFS
- De Bruijn sequence | Set 1
- Minimum Operations to make value of all vertices of the tree Zero
- Minimum time to return array to its original state after given modifications
- Number of Hamiltonian cycle
- Basic Properties of a Graph
- Print the lexicographically smallest BFS of the graph starting from 1
- Finding in and out degrees of all vertices in a graph
- Printing pre and post visited times in DFS of a graph
- Right sibling of each node in a tree given as array of edges

Thread class in python is used to define and control an activity. Each of these activities are parts of the program that are executed concurrently… Read More »

Given an undirected complete graph of N vertices where N > 2. The task is to find the number of different Hamiltonian cycle of the… Read More »

Given a directed graph and a node X. The task is to find the minimum number of edges that must be added to the graph… Read More »

Given a connected graph with N vertices and M edges. The task is to print the lexicographically smallest BFS traversal of the graph starting from… Read More »

Given an integer l and a tree represented as an undirected graph rooted at vertex 0. The task is to print the number of nodes… Read More »

Given an undirected graph of V nodes (V > 2) named V1, V2, V3, …, Vn. Two nodes Vi and Vj are connected to each… Read More »

Given an undirected graph G(V, E) with N vertices and M edges. We need to find the minimum number of edges between a given pair… Read More »

Given two integers n and m which are the dimensions of a grid. The task is to find the cost of painting the grid cell… Read More »

Given two integers N and M, the task is to count the number of simple undirected graphs that can be drawn with N vertices and… Read More »

Given a grid grid[][] with 4 types of blocks: 1 represents the starting block. There is exactly one starting block. 2 represents the ending block.… Read More »

Given an undirected graph with multiple connected components, the task is to clone the graph. Cloning a graph with a single connected component can be… Read More »

Given a starting position ‘k’ and two jump sizes ‘d1’ and ‘d2’, our task is to find the minimum number of jumps needed to reach… Read More »

Given an adjacency list representation of a directed graph, the task is to find the path from source to every other node in the graph… Read More »

Given a permutation P = p1, p2, …., pn of first n natural numbers (1 ≤ n ≤ 10). One can swap any two consecutive… Read More »

Depth First Search (DFS) marks all the vertices of a graph as visited. So for making DFS useful, some additional information can also be stored.… Read More »