updated calcAdjacencies
updated getAdjList, changed adjList to hold <Integer, LinkedList<Integer>> instead of ArrayList
refactored