Replace all uses of LinkedList to ArrayList.