Google interview question

Write a program for shortest path