Amazon Interview Question

Given a graph, find the shortest path between two nodes.

Interview Answer

Anonymous

Jul 29, 2016

I asked if the graph's edges are weighted? Interviewer answered yes. Then I knew it's a Dijkstra's. I explained how the algorithm works and wrote code for the same.