Uber Interview Question

I was asked to write pseudo code for a variant of shortest path problem