Cadence Design Systems interview question

How would you implement a shortest path algorithm.