added the code to rotate the linked list on a certain position in the given list