USE PYTHON
No imports can be used
input the txt file and find the shortest path that begins and ends at the vertex with label 1. This path must have at least one edge. Your answer should be a list containing the vertices in the path starting at 1. Shortest refers to the path with the fewest number of vertices.
The Txt file is below
1 21 82 32 52 122 92 163 23 104 14 105 25 166 86 187 67 208 48 69 29 59 1710 310 510 20
... so here it should be(1, 8) -> (8, 4) --> (4, 1)
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here