Sign in

If we search about Dijkstra’s algorithm then we see the definition as finding the shortest path from source vertex to all other vertices or any particular vertex. We see this statement everywhere and it is pretty clear also.

First thing is Dijkstra’s Algorithm work on greedy approach, so what is greedy approach. Greedy Approach is the method in which we find the best possible choice available, assuming that it will lead us to the best solution.

Basics of Dijkstra’s Algorithm

  • starts from source node that we choose and it analyzes the graph to find the shortest path between that node and all the other…


I am computer science student who loves to solve problems related to mathematics and programming.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store