add case for rotating more times than the length of list
sol of q060