About 431,000 results
Open links in new tab
  1. DSA Dijkstra's Algorithm - W3Schools

    Dijkstra's Algorithm on Directed Graphs. To run Dijkstra's algorithm on directed graphs, very few changes are needed. Similarly to the change we needed for cycle detection for directed graphs, we just need to remove one line of code so that the adjacency matrix is not symmetric anymore.

  2. What is Dijkstra’s Algorithm? - GeeksforGeeks

    Apr 9, 2025 · Dijkstra’s algorithm is a popular algorithm for solving single-source shortest path problems having non-negative edge weight in the graphs i.e., it is to find the shortest distance between two vertices on a graph.

  3. Dijkstra’s Algorithm Explanation with example - Quescol

    Mar 27, 2021 · Dijkstra’s algorithm is a greedy algorithm that solves the single-source shortest path problem for a directed and undirected graph that has non-negative edge weight. For Graph G = (V, E) w (u, v) ≥ 0 for each edge (u, v) ∈ E.

  4. Shortest path in a directed graph by Dijkstra’s algorithm

    Dec 27, 2023 · Given a directed graph and a source vertex in the graph, the task is to find the shortest distance and path from source to target vertex in the given graph where edges are weighted (non-negative) and directed from parent vertex to source vertices.

  5. Dijkstra's algorithm - Wikipedia

    Dijkstra's algorithm (/ ˈdaɪkstrəz / DYKE-strəz) is an algorithm for finding the shortest paths between nodes in a weighted graph, which may represent, for example, a road network. It was conceived by computer scientist Edsger W. Dijkstra in …

  6. Is Dijkstra's algorithm for directed or undirected graphs?

    Jul 4, 2016 · In the context of Dijkstra's algorithm, whether the graph is directed or undirected does not matter. Dijkstra's algorithm simply references the adjacent vertices of a vertex. It is this adjacency list that you would have to modify if you were changing a graph from directed to …

  7. Dijkstra's Shortest Path Algorithm - Brilliant

    One algorithm for finding the shortest path from a starting node to a target node in a weighted graph is Dijkstra’s algorithm. The algorithm creates a tree of shortest paths from the starting vertex, the source, to all other points in the graph.

  8. Shortest path: Dijkstra’s algorithm, Bellman-Ford algorithm

    Jan 5, 2025 · Dijkstra’s algorithm is one of the most famous—and useful—algorithms in all computer science. Given a weighted directed graph, G , and some starting node S , Dijkstra’s algorithm will find the shortest paths from S to all other nodes in the graph.

  9. Dijkstra - finding shortest paths from given vertex - Algorithms

    Sep 24, 2023 · Dijkstra Algorithm¶ You are given a directed or undirected weighted graph with $n$ vertices and $m$ edges. The weights of all edges are non-negative. You are also given a starting vertex $s$. This article discusses finding the lengths of the shortest paths from a starting vertex $s$ to all other vertices, and output the shortest paths themselves.

  10. Dijkstra's Algorithm - Tpoint Tech - Java

    Mar 17, 2025 · Directed Graph: A Graph with edges with direction is termed a Directed Graph. The edges of this graph imply a one-way relationship in which each edge can only be traversed in a single direction. The following figure displays a …

  11. Some results have been removed