java@ 利用ArrayList实现dijkstra算法以及topological 排序算法(java.util.ArrayList)
packagedataStructure;
importjava.util.ArrayList;
importjava.util.LinkedList;
importjava.util.Queue;
importjava.util.Scanner;
importjava.io.*;
classnode{
intto,dist;
node(intt,intd){
to=t;