Loading repovive.com/problems/classics/11
Given an unweighted undirected graph with vertices and edges, find the shortest distance from vertex to all other vertices.
If a vertex is unreachable from vertex , output for that vertex.
For this input, the required output is 0 1 1 2.
For this input, the required output is 0 1 2.
For this input, the required output is 0 1 -1 -1.