Graph implementation

Below is the syntax highlighted version of Graph.java from §4.1 Undirected Graphs. /****************************************************************************** * Compilation: javac Graph.java * Execution: java Graph input.txt * Dependencies: Bag.java Stack.java In.java StdOut.java * Data files: http://algs4.cs.princeton.edu/41graph/tinyG.txt * http://algs4.cs.princeton.edu/41graph/mediumG.txt *

Read more

DoublyLinkedList.java

http://algs4.cs.princeton.edu/13stacks/DoublyLinkedList.java.html   /****************************************************************************** * Compilation: javac DoublyLinkedList.java * Execution: java DoublyLinkedList * Dependencies: StdOut.java * * A list implemented with a doubly linked list. The elements are stored * (and iterated over) in the same

Read more