Adding algorithm to detect if a linked list is circular.