static LinkedListNode getKth(LinkedListNode n, int k) {
        int i = 0;
        LinkedListNode m = n;
        while (i<=k && m!=null) {
            m = m.next;
            i += 1;
        }
        if (i != k+1) return null;
        while (m != null) {
            n=n.next;
            m=m.next;
        }
        return n;
    }