Skip to content

Instantly share code, notes, and snippets.

View first
import java.util.ArrayList;
* Find path from vertex 1 to N for an undirected graph of N vertices and M edges.
* -- Image included -- resources/FindPathInGraph.jpg
* Uses adjacency_list: An adjacency list is a collection of unordered lists used to represent a finite graph.
* Each unordered list within an adjacency list describes the set of neighbors of a particular vertex in the graph.
View second
View gist:5f8429b7911223bd14142952a43612f4
package com.testharness;
import org.junit.Assert;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
public class InverterTest {