Adjacency list

Implementation from Skiena's The Algorithm Design Manual