Solution for Rotate List.