Skip to content

Instantly share code, notes, and snippets.

View nodirt's full-sized avatar

Nodir Turakulov nodirt

View GitHub Profile
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