## Find maximum path length in a binary matrix

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 »

- 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
- Detect Cycle in a Directed Graph
- Prim’s Minimum Spanning Tree (MST) | Greedy Algo-5
- Kruskal’s Minimum Spanning Tree Algorithm | Greedy Algo-2
- 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
- Minimum steps to reach target by a Knight | Set 1
- Check whether a given graph is Bipartite or not
- Travelling Salesman Problem | Set 1 (Naive and Dynamic Programming)
- Strongly Connected Components
- Applications of Depth First Search
- 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)
- Connected Components in an undirected graph
- Shortest path in a Binary Maze
- Dijkstra's Shortest Path Algorithm using priority_queue of STL
- Given a sorted dictionary of an alien language, find order of characters
- Hamiltonian Cycle | Backtracking-6
- m Coloring Problem | Backtracking-5
- Applications of Breadth First Traversal
- Snake and Ladder Problem
- Find a Mother Vertex in a Graph

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 »

Pre-Requisites: Depth First Search | Parent Array Representation Given a parent array representation of a binary tree, we need to find the number of Isosceles… Read More »

Given n companies and m oil mines having values, the task is to distribute the mines among n companies in a fair manner. That is… Read More »

The Jump pointer algorithm is a design technique for parallel algorithms that operate on pointer structures, such as arrays or linked list. This algorithm is… Read More »

Given an undirected graph, check if it contains an independent set of size k. Print ‘Yes’ if there exists an independent set of size k.… Read More »

Given a graph with n nodes and m edges. Find the maximum possible number of nodes which are not part of any edge (m will… Read More »

A Graph is a non-linear data structure consisting of nodes and edges. The nodes are sometimes also referred to as vertices and the edges are… Read More »

We are given m*n matrix which can have a number between 0 and 7. Each number represents a pipe with a shape as follows: Two… Read More »