Amazon interview question

Some questions about hashmap and array list