In this case it's much more effective to use `LinkedList`, see http://stackoverflow.com/questions/322715/when-to-use-linkedlist-over-arraylist