## Dijkstra’s shortest path with minimum edges

Prerequisite: Dijkstra’s shortest path algorithm Given an adjacency matrix graph representing paths between the nodes in the given graph. The task is to find the… Read More »

- Breadth First Search or BFS for a Graph
- Depth First Search or DFS for a Graph
- Dijkstra's shortest path algorithm | Greedy Algo-7
- Graph and its representations
- Prim’s Minimum Spanning Tree (MST) | Greedy Algo-5
- Kruskal’s Minimum Spanning Tree Algorithm | Greedy Algo-2
- Detect Cycle in a Directed Graph
- Topological Sorting
- Disjoint Set (Or Union-Find) | Set 1 (Detect Cycle in an Undirected Graph)
- Floyd Warshall Algorithm | DP-16
- Find the number of islands | Set 1 (Using DFS)
- Bellman–Ford Algorithm | DP-23
- Detect cycle in an undirected graph
- Travelling Salesman Problem | Set 1 (Naive and Dynamic Programming)
- Strongly Connected Components
- Minimum steps to reach target by a Knight | Set 1
- Applications of Depth First Search
- Check whether a given graph is Bipartite or not
- Minimum number of swaps required to sort an array
- Dijkstra’s Algorithm for Adjacency List Representation | Greedy Algo-8
- Union-Find Algorithm | Set 2 (Union By Rank and Path Compression)
- Shortest path in a Binary Maze
- Given a sorted dictionary of an alien language, find order of characters
- Dijkstra's Shortest Path Algorithm using priority_queue of STL
- Minimum time required to rot all oranges
- Hamiltonian Cycle | Backtracking-6
- Connected Components in an undirected graph
- Snake and Ladder Problem
- m Coloring Problem | Backtracking-5
- Applications of Breadth First Traversal

Prerequisite: Dijkstra’s shortest path algorithm Given an adjacency matrix graph representing paths between the nodes in the given graph. The task is to find the… Read More »

Given a directed graph, check whether the graph contains a cycle or not. Your function should return true if the given graph contains at least… Read More »

There are a total of n tasks you have to pick, labeled from 0 to n-1. Some tasks may have prerequisites, for example to pick… Read More »

There are a total of n tasks you have to pick, labeled from 0 to n-1. Some tasks may have prerequisites tasks, for example to… Read More »

Prerequisite: Graph Theory Basics – Set 1, Graph Theory Basics – Set 2 A graph G = (V, E) consists of a set of vertices… Read More »

Given an integer n and a set of characters A of size k, find a string S such that every possible string on A of… Read More »

Given two arrays of integers arr and P such that after a cycle an element arr[i] will be at location arr[P[i]]. The task is to… Read More »

Given a tree, with N nodes and E edges (every edge is denoted by two integers, X, Y stating that X is the parent of… Read More »

Given a square matrix mat every element of which is either 0 or 1. A value 1 means connected and 0 means not connected. The… Read More »

Given integers ‘N’ and ‘K’ where, N is the number of vertices of an undirected graph and ‘K’ denotes the number of edges in the… Read More »

Given a graph and two vertices src and dest, count the total number of paths from src to dest where the length of the path… Read More »

Given a tree check if it is linear or not. 1 / \ 2 3 Linear as we can form a lime 2 1 3… Read More »

Given a directed graph represented as an adjacency matrix and an integer ‘k’, the task is to find all the vertex pairs that are connected… Read More »

In graph theory, edge coloring of a graph is an assignment of “colors” to the edges of the graph so that no two adjacent edges… Read More »

Given a Markov chain G, we have the find the probability of reaching the state F at time t = T if we start from… Read More »