Implement the rotating linked list to k positions problem.