Deloitte interview question

Write a program for shortest path problem.