added a solution to the problem of rotating a linked list