cloone graph represented by adjacent list, use visit map to keep track of nodes pushed into stack