Similar Problems

Similar Problems not available

Shortest path in an unweighted graph - Leetcode Solution

LeetCode:  Shortest path in an unweighted graph Leetcode Solution

Difficulty: Unknown

Topics: graphs  

Problem Statement

Given the directed, connected and unweighted graph G, a Source and a Destination and the task to find the shortest path possible between two given vertices in the graph.

Note: The path does not contain any cycle which means path have finite number of vertices.

Example Input

Expected Output

Path : 0 3

Shortest path in an unweighted graph Solution Code

1