Citi interview question

Implementation of arraylist