NatWest Group Interview Question

String manipulation and arrays manipulation