Skip to content

Instantly share code, notes, and snippets.

@jjlumagbas
Created December 5, 2016 17:07
Show Gist options
  • Save jjlumagbas/c8757d7da429d872fb299d901ba76a49 to your computer and use it in GitHub Desktop.
Save jjlumagbas/c8757d7da429d872fb299d901ba76a49 to your computer and use it in GitHub Desktop.
import java.util.List;
public class Graph {
public void addNode(String src) {
}
public void addEdge(String src, String dst) {
}
public void removeEdge(String src, String dst) {
}
public boolean hasEdge(String src, String dst) {
return false;
}
public List<String> outEdges(String src) {
return null;
}
public List<String> inEdges(String src) {
return null;
}
public List<String> bfs(String src) {
return null;
}
public List<String> dfs(String src) {
return null;
}
}
import org.junit.Test;
public class GraphTest {
@Test
public void addNode() throws Exception {
}
@Test
public void addEdge() throws Exception {
}
@Test
public void removeEdge() throws Exception {
}
@Test
public void hasEdge() throws Exception {
}
@Test
public void outEdges() throws Exception {
}
@Test
public void inEdges() throws Exception {
}
@Test
public void bfs() throws Exception {
}
@Test
public void dfs() throws Exception {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment