Capital One interview question

Solve a shortest path problem