Switch from LinkedList to ArrayList.