static LinkedListNode findCircularHead(LinkedListNode n) {
        LinkedListNode fast = null;
        LinkedListNode slow = null;

        if (n == null) return null;
        if (n.next != null && n.next.next != null) {
            fast = n.next.next;
            slow = n.next;
        }

        while (fast != null && fast.next != null) {
            if (fast == slow) {
                break;
            }
            fast = fast.next.next;
            slow = slow.next;
        }

        slow = n;
        while (slow != fast && fast != null) {
            slow = slow.next;
            fast = fast.next;
        }

        if (slow == n.next) {
            return null;
        }

        return slow;
    }