Pergunta de entrevista da empresa HSBC

One technical coding challenge. It was average