Change Adjacency List from ArrayList to LinkedList