public ListNode detectCycle(ListNode head) {

        if(head == null || head.next == null) return null;
        ListNode low = head;
        ListNode high = head.next;
        if(low == high) return head;
        ListNode temp = null;
        while(high.next !=null && high.next.next != null)
        {
            low = low.next;
            high = high.next.next;
            if(low == high ) {
                temp = low;
                break;
            }
        }
        if(high.next == null|| high.next.next == null) return null;
        else
        {
            temp = findEntry(head,temp);
            return temp;
        }
    }