Apple interview question

Data structure, algorithm and Java concepts