Changed 2013 s4's representation of graph from Adjacency Matrix to Adjacency List, can now handle large inputs