Only updates the adjacency list's size when it adds a head node
Catches OutOfMemoryExceptions and continues running