public ListNode rotateRight(ListNode head, int n) {
        if(n  == 0 || head == null)
            return head;
        int size =0;
        ListNode step = head;
        ListNode last = head;
        while(step != null){
            last = step;
            size++;
            step = step.next;
        }
        n =  n % size;
        if(n  == 0)
            return head;

        step = head;
        ListNode newLast = head;
        for(int i=0;i< size -n;i++){
            newLast = step;
            step = step.next;
        }
        newLast.next = null;
        last.next = head;
        return step;
    }