← Questions
Shortest path, nodes on any shortest path, and can Alice evade Bob
0
I was asked this
No reports yet. Sign in to say where you were asked it.
You get an undirected, unweighted graph with n nodes. Alice starts at node a and wants to reach node t.
- Return the length of the shortest path from
atot. - Return every node that lies on at least one shortest path from
atot. - Bob is also on the graph and tries to catch Alice. Decide whether Alice can reach
twithout Bob getting to her first.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
