Skip to content

Instantly share code, notes, and snippets.

View formidablefrank's full-sized avatar

J Franco Ray formidablefrank

  • Philippines
  • 06:16 (UTC +08:00)
View GitHub Profile
@imamhidayat92
imamhidayat92 / Graph.java
Created December 30, 2014 22:49
A very simple undirected and unweighted graph implementation using Java. Vertices and edges information are stored in an adjacency map.
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
/**
* A simple undirected and unweighted graph implementation.
*
* @param <T> The type that would be used as vertex.
*/
public class Graph<T> {