Tummee interview question

Problem on Array operation Problem on Map and Set