graph hasLoop,  DFSByInteration