{"id":216,"date":"2023-04-04T15:32:47","date_gmt":"2023-04-04T15:32:47","guid":{"rendered":"https:\/\/vmlogger.com\/algorithms\/?p=216"},"modified":"2023-04-04T17:10:14","modified_gmt":"2023-04-04T17:10:14","slug":"dijkstras-shortest-path-algorithm","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/","title":{"rendered":"Dijkstra’s shortest path algorithm"},"content":{"rendered":"

Dijkstra’s shortest path algorithm is a widely used algorithm in computer science that finds the shortest path between nodes in a graph with non-negative edge weights. It was developed by Edsger W. Dijkstra in 1956 and has since become a fundamental algorithm in network routing protocols, map applications, and many other areas of computer science. In this article, we will discuss the working of the algorithm, its implementation, and some interesting facts behind it.<\/p>\n

\n

Content:<\/h2>\n
    \n
  1. What is Dijkstra’s Shortest Path Algorithm?<\/a><\/li>\n
  2. How does Dijkstra’s Algorithm Work?<\/a><\/li>\n
  3. Step by Step explanation of Dijkstra’s Algorithm:<\/a><\/li>\n
  4. Implementation of Dijkstra’s Algorithm – minHeap<\/a><\/a><\/li>\n
  5. Implementation of Dijkstra’s Algorithm – array<\/a><\/li>\n
  6. An interesting information – Shared by the man himself<\/a><\/li>\n<\/ol>\n<\/div>\n

    How does Dijkstra’s Algorithm Work?<\/h2>\n

    Dijkstra’s algorithm works by maintaining a set of unexplored nodes and a tentative distance for each node. Initially, all nodes have a tentative distance of infinity, except for the starting node which has a tentative distance of zero. The algorithm then selects the node with the smallest tentative distance and explores all its neighbors. For each neighbor, the algorithm updates its tentative distance if the new distance is smaller than the current tentative distance. This process continues until the destination node is explored or all nodes have been explored.<\/p>\n

    \"Dijkstras

    Dijkstras Algorithm Animation (Source: Wiki)<\/p><\/div>\n

    Step by Step explanation of Dijkstra’s Algorithm:<\/h2>\n
    \n
      \n
    1. Create a set of visited nodes.<\/li>\n
    2. Assign a tentative distance of infinity to all nodes.<\/li>\n
    3. Set the start node distance to zero [0].<\/li>\n
    4. Set the starting node as the current node.<\/li>\n
    5. Traverse all its neighbors and update their tentative distances if necessary.<\/li>\n
    6. Mark the node as visited and move to the next non-visited node.<\/li>\n
    7. Select the node with the smallest tentative distance and set it as the new current node. If all nodes have been visited, stop.<\/li>\n
    8. Repeat steps 4 to 6 until the destination node is visited.<\/li>\n
    9. The algorithm can be optimized by using a priority queue [minHeap<\/a>] to select the node with the smallest tentative distance instead of scanning all unexplored nodes.<\/li>\n<\/ol>\n<\/div>\n

      Implementation of Dijkstra’s Algorithm<\/h2>\n

      The algorithm can be implemented using a variety of data structures, but the most common implementation uses a priority queue to keep track of unexplored nodes sorted by their tentative distances. The algorithm can also be implemented using an array.
      \nHere is an implementation of Dijkstra’s algorithm using Python in both data structures –
      minHeap<\/a> and Array.<\/p>\n

      Dijkstra’s Algorithm implementation using minHeap<\/code><\/h2>\n

      This is the most efficient implementation of Dijkstra’s algorithm using the minHeap<\/a> data structure. <\/p>\n

      \n

      Info:<\/span><\/h4>\n\n

      The time complexity of this implementation is O((V+E)*log V) <\/code>
      \nwhere: <\/code>
      \n V – is the number of Vertexes (total number of cities) and E – is the total number of connections [or edges].<\/p>\n\n

      Vertex:<\/code> Vertex is a point where two or more edges or lines meet in a graph.
      \nEdge:<\/code> Edges are connecting lines in a graph.\n<\/div>\n

      \r\n\r\ndef dijkstraUsingHeap(connections, start):\r\n        \"\"\"\r\n        Dijkstra's algorithm using minHeap Data Strcuture\r\n\r\n        Parameters:\r\n        ---------------\r\n            connections : nested dictionary with all possible connections and distances [weight]\r\n            start       : starting city name [starting node]\r\n\r\n        returns:\r\n        ---------------\r\n            returns a dictionary with the shortest distances to reach each place from starting city\r\n\r\n        \"\"\"\r\n        connections = self.connections\r\n        start = self.start\r\n        # first all distances to infinity in the disctionary\r\n        distances = {connection: float(\"inf\") for connection in connections}\r\n        # distance from start to start point = 0\r\n        distances[start] = 0\r\n        minHeap = [(0, start)]\r\n\r\n        # loop through until heap is empty\r\n        # heap will be empty when all the cities are traversed\r\n        # once which are reachable from starting city.\r\n\r\n        while minHeap:\r\n            current_distance, current_city = heapq.heappop(minHeap)\r\n            # if min distance is already found - do nothing - continue\r\n            if current_distance > (distances[current_city]):\r\n                continue\r\n            # else get the distances and find the minimum one\r\n            for childCity, distance in connections[current_city].items():\r\n                NewDistance = current_distance + distance\r\n                if NewDistance < distances[childCity]:\r\n                    distances[childCity] = NewDistance\r\n                    heapq.heappush(minHeap, (NewDistance, childCity))\r\n        return distances\r\n<\/pre>\n

      Dijkstra's Algorithm implementation using Array<\/code><\/h2>\n

      This is the least efficient implementation of Dijkstra's algorithm as compared to the above implementation using minHeap<\/a><\/code>.<\/p>\n

      \r\ndef dijkstraUsingArray(connections, start):\r\n        \"\"\"\r\n        Dijkstra's algorithm using array Data Strcuture\r\n\r\n        Parameters:\r\n        ---------------\r\n            connections : nested dictionary with all possible connections and distances [weight]\r\n            start       : starting city name [starting node]\r\n\r\n        returns:\r\n        ---------------\r\n            returns a dictionary with the shortest distances to reach each place from starting city\r\n\r\n        \"\"\"\r\n        connections = self.connections\r\n        start = self.start\r\n        # first all distances to infinity in the disctionary\r\n        distances = {connection: float(\"inf\") for connection in connections}\r\n        # distance from start to start point = 0\r\n        distances[start] = 0\r\n        visited = set()\r\n        while len(visited) != len(connections):\r\n            connection, minDistance = self.__getMinimumDistance(distances, visited)\r\n\r\n            if minDistance == float(\"inf\"):\r\n                break\r\n            visited.add(connection)\r\n            for destination, distance in connections[connection].items():\r\n                newDistance = minDistance + distance\r\n                currentDistance = distances[destination]\r\n                if currentDistance > newDistance:\r\n                    distances[destination] = newDistance\r\n        return distances\r\n\r\n    def getMinimumDistance(self, distances, visited):\r\n\r\n        minDistance = float(\"inf\")\r\n        vertex = None\r\n        for vertexId, distance in distances.items():\r\n            if vertexId in visited:\r\n                continue\r\n            if distance <= minDistance:\r\n                minDistance = distance\r\n                vertex = vertexId\r\n        return vertex, minDistance\r\n<\/pre>\n

      Example: With input and output for the above implementation<\/h2>\n

      Following is the same input <\/p>\n

      \r\n\r\nconnections = {\r\n    \"AMS\": {\"BOM\": 3, \"DEL\": 4, \"GOP\": 1},\r\n    \"BOM\": {\"GOP\": 5, \"DEL\": 1},\r\n    \"DEL\": {\"GOP\": 3},\r\n    \"GOP\": {\"DEL\": 2},\r\n}\r\nstartCity = \"AMS\"\r\n# using heap data structure\r\ndistances = dijkstraUsingHeap(connections, startCity)\r\nprint(distances)\r\n# using array data structure\r\ndistances = dijkstraUsingArray(connections, startCity)\r\nprint(distances)\r\n\r\n<\/pre>\n

      After running the above code, the following is the result:
      \n

      \"Dijkstras

      Dijkstras Algorithm Result<\/p><\/div><\/p>\n

      An interesting information - Shared by the man himself <\/h2>\n

      \nWhat\u2019s the shortest way to travel from Rotterdam to Groningen? It is the algorithm for the shortest path, which I designed in about 20 minutes. One morning I was shopping in Amsterdam with my young fianc\u00e9e, and tired, we sat down on the caf\u00e9 terrace to drink a cup of coffee. I was just thinking about whether I could do this, and I then designed the algorithm for the shortest path. As I said, it was a 20-minute invention. It was published in 1959, three years later. The publication is still quite nice. <\/p>\n

      One of the reasons that it is so nice is that I designed it without pencil and paper. Without pencil and paper, you are almost forced to avoid all avoidable complexities. Eventually, that algorithm became, to my great amazement, one of the cornerstones of my fame.<\/p>\n<\/blockquote>\n

      \u2014 As quoted in the article Edsger W. Dijkstra from An interview with Edsger W. Dijkstra<\/a>.<\/p>\n<\/span>","protected":false},"excerpt":{"rendered":"

      Dijkstra’s shortest path algorithm is a widely used algorithm in computer science that finds the shortest path between nodes in a graph with non-negative edge weights. It was developed by Edsger W. Dijkstra in 1956 and has since become a fundamental algorithm in network routing protocols, map applications, and many other areas of computer science. […]<\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[9],"tags":[],"class_list":["post-216","post","type-post","status-publish","format-standard","hentry","category-medium"],"yoast_head":"\nDijkstra's shortest path algorithm - Algorithms<\/title>\n<meta name=\"description\" content=\"Dijkstra's Algorithm | Implementation of Dijkstra's algorithm in Python | Implement Dijkstra's Algorithm using minHeap Data Structure. Interesting facts\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dijkstra's shortest path algorithm\" \/>\n<meta property=\"og:description\" content=\"Dijkstra's Algorithm | Implementation of Dijkstra's algorithm in Python | Implement Dijkstra's Algorithm using minHeap Data Structure. Interesting facts\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/\" \/>\n<meta property=\"og:site_name\" content=\"Algorithms\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/vmlogger\" \/>\n<meta property=\"article:author\" content=\"http:\/\/www.facebook.com\/vmlogger\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-04T15:32:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-04T17:10:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/04\/Dijkstra_Animation.gif\" \/>\n<meta name=\"author\" content=\"Vishwamitra Mishra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/www.twitter.com\/learnexcelmacro\" \/>\n<meta name=\"twitter:site\" content=\"@learnexcelmacro\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vishwamitra Mishra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/\"},\"author\":{\"name\":\"Vishwamitra Mishra\",\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"headline\":\"Dijkstra’s shortest path algorithm\",\"datePublished\":\"2023-04-04T15:32:47+00:00\",\"dateModified\":\"2023-04-04T17:10:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/\"},\"wordCount\":705,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"image\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/04\/Dijkstra_Animation.gif\",\"articleSection\":[\"Medium\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/\",\"url\":\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/\",\"name\":\"Dijkstra's shortest path algorithm - Algorithms\",\"isPartOf\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/04\/Dijkstra_Animation.gif\",\"datePublished\":\"2023-04-04T15:32:47+00:00\",\"dateModified\":\"2023-04-04T17:10:14+00:00\",\"description\":\"Dijkstra's Algorithm | Implementation of Dijkstra's algorithm in Python | Implement Dijkstra's Algorithm using minHeap Data Structure. Interesting facts\",\"breadcrumb\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#primaryimage\",\"url\":\"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/04\/Dijkstra_Animation.gif\",\"contentUrl\":\"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/04\/Dijkstra_Animation.gif\",\"width\":283,\"height\":222,\"caption\":\"Dijkstras Algorithm Animation\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/vmlogger.com\/algorithms\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dijkstra’s shortest path algorithm\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#website\",\"url\":\"https:\/\/vmlogger.com\/algorithms\/\",\"name\":\"Algorithms\",\"description\":\"Welcome to the World of Algorithms\",\"publisher\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/vmlogger.com\/algorithms\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\",\"name\":\"Vishwamitra Mishra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/03\/welcome-1.png\",\"contentUrl\":\"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/03\/welcome-1.png\",\"width\":1963,\"height\":843,\"caption\":\"Vishwamitra Mishra\"},\"logo\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/image\/\"},\"description\":\"My name is Vishwamitra Mishra. Friends Call me Vishwa. I hold a Bachelor\u2019s Degree in Computer Science from D.A.V.V. Indore & currently working as a Technical Lead having over 7 years of experience.\",\"sameAs\":[\"http:\/\/www.learnexcelmacro.com\",\"http:\/\/www.facebook.com\/vmlogger\",\"https:\/\/x.com\/https:\/\/www.twitter.com\/learnexcelmacro\",\"https:\/\/www.youtube.com\/c\/VMLogger\"],\"url\":\"https:\/\/vmlogger.com\/algorithms\/author\/vishwamitra\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Dijkstra's shortest path algorithm - Algorithms","description":"Dijkstra's Algorithm | Implementation of Dijkstra's algorithm in Python | Implement Dijkstra's Algorithm using minHeap Data Structure. Interesting facts","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/","og_locale":"en_US","og_type":"article","og_title":"Dijkstra's shortest path algorithm","og_description":"Dijkstra's Algorithm | Implementation of Dijkstra's algorithm in Python | Implement Dijkstra's Algorithm using minHeap Data Structure. Interesting facts","og_url":"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/","og_site_name":"Algorithms","article_publisher":"http:\/\/www.facebook.com\/vmlogger","article_author":"http:\/\/www.facebook.com\/vmlogger","article_published_time":"2023-04-04T15:32:47+00:00","article_modified_time":"2023-04-04T17:10:14+00:00","og_image":[{"url":"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/04\/Dijkstra_Animation.gif"}],"author":"Vishwamitra Mishra","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/www.twitter.com\/learnexcelmacro","twitter_site":"@learnexcelmacro","twitter_misc":{"Written by":"Vishwamitra Mishra","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#article","isPartOf":{"@id":"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/"},"author":{"name":"Vishwamitra Mishra","@id":"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"headline":"Dijkstra’s shortest path algorithm","datePublished":"2023-04-04T15:32:47+00:00","dateModified":"2023-04-04T17:10:14+00:00","mainEntityOfPage":{"@id":"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/"},"wordCount":705,"commentCount":0,"publisher":{"@id":"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"image":{"@id":"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#primaryimage"},"thumbnailUrl":"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/04\/Dijkstra_Animation.gif","articleSection":["Medium"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/","url":"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/","name":"Dijkstra's shortest path algorithm - Algorithms","isPartOf":{"@id":"https:\/\/vmlogger.com\/algorithms\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#primaryimage"},"image":{"@id":"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#primaryimage"},"thumbnailUrl":"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/04\/Dijkstra_Animation.gif","datePublished":"2023-04-04T15:32:47+00:00","dateModified":"2023-04-04T17:10:14+00:00","description":"Dijkstra's Algorithm | Implementation of Dijkstra's algorithm in Python | Implement Dijkstra's Algorithm using minHeap Data Structure. Interesting facts","breadcrumb":{"@id":"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#primaryimage","url":"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/04\/Dijkstra_Animation.gif","contentUrl":"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/04\/Dijkstra_Animation.gif","width":283,"height":222,"caption":"Dijkstras Algorithm Animation"},{"@type":"BreadcrumbList","@id":"https:\/\/vmlogger.com\/algorithms\/2023\/04\/04\/dijkstras-shortest-path-algorithm\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vmlogger.com\/algorithms\/"},{"@type":"ListItem","position":2,"name":"Dijkstra’s shortest path algorithm"}]},{"@type":"WebSite","@id":"https:\/\/vmlogger.com\/algorithms\/#website","url":"https:\/\/vmlogger.com\/algorithms\/","name":"Algorithms","description":"Welcome to the World of Algorithms","publisher":{"@id":"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vmlogger.com\/algorithms\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5","name":"Vishwamitra Mishra","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/image\/","url":"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/03\/welcome-1.png","contentUrl":"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/03\/welcome-1.png","width":1963,"height":843,"caption":"Vishwamitra Mishra"},"logo":{"@id":"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/image\/"},"description":"My name is Vishwamitra Mishra. Friends Call me Vishwa. I hold a Bachelor\u2019s Degree in Computer Science from D.A.V.V. Indore & currently working as a Technical Lead having over 7 years of experience.","sameAs":["http:\/\/www.learnexcelmacro.com","http:\/\/www.facebook.com\/vmlogger","https:\/\/x.com\/https:\/\/www.twitter.com\/learnexcelmacro","https:\/\/www.youtube.com\/c\/VMLogger"],"url":"https:\/\/vmlogger.com\/algorithms\/author\/vishwamitra\/"}]}},"_links":{"self":[{"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/posts\/216"}],"collection":[{"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/comments?post=216"}],"version-history":[{"count":30,"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/posts\/216\/revisions"}],"predecessor-version":[{"id":378,"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/posts\/216\/revisions\/378"}],"wp:attachment":[{"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/media?parent=216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/categories?post=216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/tags?post=216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}