@@ -0,0 +1,659 @@
+/**%0A * Definition for singly-linked list.%0A * public class ListNode %7B%0A *     int val;%0A *     ListNode next;%0A *     ListNode(int x) %7B val = x; %7D%0A * %7D%0A */%0Apublic class Solution %7B%0A    public ListNode rotateRight(ListNode head, int k) %7B%0A        if(head == null %7C%7C head.next == null)%7B%0A            return head;%0A        %7D%0A        ListNode newHead = head;%0A        int i = 1;%0A        while(head.next != null)%7B%0A            head = head.next;%0A            i++;%0A        %7D%0A        head.next = newHead;%0A        k = i - k %25 i;%0A        while(k-- %3E 0)%7B%0A            head = head.next;%0A        %7D%0A        newHead = head.next;%0A        head.next = null;%0A        return newHead;%0A    %7D%0A%7D

Q61 Rotate List