## Check if it is possible to reach a number by making jumps of two given length

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 »

- Detect cycle in an undirected graph using BFS
- Print all the cycles in an undirected graph
- Check if a given graph is Bipartite using DFS
- Samsung Semiconductor Institute of Research(SSIR Software) intern/FTE | Set-3
- Detect Cycle in a Directed Graph using BFS
- Nutanix Interview Experience (On-Campus)
- Find the number of distinct islands in a 2D matrix
- Kruskal's Algorithm (Simple Implementation for Adjacency Matrix)
- Tree, Back, Edge and Cross Edges in DFS of Graph
- Maximum number of edges among all connected components of an undirected graph
- Dijkstra's shortest path with minimum edges
- Level Ancestor Problem
- Minimum cost path from source node to destination node via an intermediate node
- Applications of Graph Data Structure
- Subtree of all nodes in a tree using DFS
- Number of Walks from source to destination
- Jump Pointer Algorithm
- Johnson’s algorithm for All-pairs shortest paths | Implementation
- Coloring a Cycle Graph
- Difference between graph and tree
- Find the ordering of tasks from given dependencies
- Edge Coloring of a Graph
- Prim's Algorithm (Simple Implementation for Adjacency Matrix Representation)
- Find whether it is possible to finish all tasks or not from given dependencies
- Shortest Path using Meet In The Middle
- Number of Isosceles triangles in a binary tree
- Print the DFS traversal step-wise (Backtracking also)
- Graph Types and Applications
- Find maximum path length in a binary matrix
- Minimum time to return array to its original state after given modifications

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 »

Given a binary matrix of size NxN where 1 denotes that the number i can be converted to j, and 0 denotes it cannot be… Read More »

Given a directed graph, the task is to count the in and out degree of each vertex of the graph. Examples: Input: Output: Vertex In… Read More »

Graph : A graph is collection of two sets V and E where V is a finite non-empty set of vertices and E is a… Read More »

Given a graph G, the task is to check if it represents a Star Topology. A Star Topology is the one shown in the image… Read More »

Given a graph G, the task is to check if it represents a Ring Topology. A Ring Topology is the one shown in the image… Read More »

Given a tree, where each vertex V has a value A[V] stored in it. The task is to find the minimum number of operations required… Read More »

Given a graph G, check if it represents a Bus Topology. A Bus Topology is the one shown in the image below: Examples: Input: Output:… Read More »

The relabel-to-front algorithm is used to find the maximum flow in the network. The relabel-to-front algorithm is more efficient than the generic push-relabel method. In… Read More »

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 »