Amazon interview question

Breadth first search and Dijkstra's algorithm