Solved Linked List Cycle problem