Solution for Linked List Cycle