HSBC interview question

iterate over map