Java Arraylist Add Time Complexity Interview