J.P. Morgan interview question

Various questions on collections in java