Rotate List

This is No.61 in leetcode. The description: Given a linked list, rotate the list to the right by k places, where k is non-negative. This is my original solution: /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int val) { this.val = …