Add method to check for self loops using Tortoise and Hare algorithm.