X-Nico

unusual facts about linked list



Move-to-front transform

For encoding, no clear advantage is gained by using a linked list, so using an array to store the list is acceptable, with worst case performance O(nk), where n is the length of the data to be encoded and k is the number of values (generally a constant for a given implementation).


see also

UnShuffle sort

Arrays can also be treated as a stream and subjected to the iterative sort rather than build a linked list from the array.