Changed the representation of the adjacency list to an ArrayList of ArrayLists of Integers (fun!).