HSBC Interview Question

Coding in any language we are comfortable in