The algorithm computes from one source vertex the whole thing.
What if no edges come out from the vertex i assume as source? how do you do it?
If i assume the first vertex as source, and in the test case, no edges come out from vertex 1, but only comes in... asking for solutions..