if not head or not head.next or k == 0: return head # No rotation needed for an empty list, single-node list, or k = 0 ...
Given a list, rotate the list to the right by k places, where k is non-negative. 这题要求把链表后面k个节点轮转到链表前面 ...