how to optimize dijkstra algorithm in a graph where new nodes and edges can be added

Revision en1, by codinghermit05, 2022-03-30 10:37:52

Trying to implement the system design of Uber where I am allowed to add new locations and new routes to those locations anywhere in the map. How can I optimize my Dijkstra algorithm so that I don't have to run it for all the nodes everytime I add a new edge or node to my graph (map).

Tags dijkstra, graphs, shortest path, doubt

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English codinghermit05 2022-03-30 10:37:52 369 Initial revision (published)