non-recursive version of DFS
Using vector<list<Entry>> for AdjacencyList