code for Linked List Cycle II