Dijkstra’s shortest path algorithm finds the shortest paths between all nodes of the graph. In this article we will describe the operation principle of Dijkstra’s algorithm, which finds optimal routes. The disadvantage of this algorithm is that it will not work correctly if the graph has negative edge weights. In this tutorial you can read Dijkstra’s shortest path algorithm example. The author has solved a particular task and provided a vivid description of the solution. Following each step you will be able to solve a similar solution by yourself with ease.