Block interview question

A complicated shortest path algorithm implementation.