Dijkstra algorithm JAVA implementation

Dijkstra algorithm JAVA implementation

  • Dijkstra algorithm (greedy algorithm) is a typical shortest path algorithm, used to calculate the shortest path from one node to other nodes.
  • Its main feature is that it expands to the outer layer with the starting point as the center (breadth first search idea), until it expands to the end.
public class Dijkstra {
   
    
    
    /**
     * 两点之间路线不通
     */
    private static final int M = 10000;

    public static void main(String

Guess you like

Origin blog.csdn.net/weixin_38045214/article/details/114660514