Linked List Cycle Leetcode Solution Java