Graph implementation using adjacency list / matrix