Floyd Algorithm Cycle Detection