How to Rotate a Singly Linked List in Java
The challenge
Given a linked list, rotate the list to the right by k places, where k is non-negative.
Example 1:
Example 2:
Given a linked list, rotate the list to the right by k places, where k is non-negative.
Example 1:
Example 2: