code for Linked List Cycle