HSBC interview question

The coding questions were simple, just manipulating data