# How does Dijkstra's algorithm work?

Can someone succinctly explain how Dijkstra's algorithm works and how it may be used to find the shortest path for such a graph (from a to z)?

I've looked at some procedures online, but many of them seem to differ and it's hard to discern what I'm actually trying to accomplish.

Thanks for the help!

• The net is swarming with explanations of Dijkstra algorithm and I don't think we need yet another one here. On the other side, should you have any concrete questions, I will be glad to help. – dtldarek Nov 28 '12 at 22:49
• If I were Edsger Dijkstra, I would be annoyed that my name was associated with such a transparent and obvious algorithm. As if I hadn't done anything better! – TonyK Nov 28 '12 at 23:08
• I tried to give some intuition along an answer to a previously asked question: math.stackexchange.com/questions/45683/… – user3533 Nov 28 '12 at 23:32

 You will start from a and you will put a label 0. After that you will find all the unsolved nodes, like b (label 2) and c(label 3) . You will chose the node with the smallest label. So we will continue with b( label 2)