title: Switching order of elements in linked list more expensive than changing every element in array?
body: <p>The thing I want to do: switch orders of a sequence, and possibly change the element inside occasionally. For example, if the initial sequence is [1,2,3,4] I would like to make it into [2,3,4,1] and then [3,4,1,2], [4,1,2,3] and so on. Sometimes change the first element of the sequence and get [5,4,1,2].
  I was wondering if swapping the order of the elements of a Linked List would be more expensive? than changing every element in the array. Because to me, it seems like taking the first element of the linked list and adding it to the end of the linked list is less work than changing every element of the array. But when I googled it, some people said swapping orders of a linked list is too much work. </p>