ServiceNow Interview Question

Question in Round 3 on graphs and shortest path