This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class BellmanFord | |
{ | |
public static long dist[]; | |
public static long prev[]; | |
public static LinkedList<DirectedEdge> edgesList = new LinkedList<DirectedEdge>(); | |
public static class DirectedEdge{ | |
protected int v; | |
protected int w; // edge |