Amazon Interview Question

Breadth first search and Dijkstra's algorithm