[linkedlist] write code for rotate list