OpenText Interview Question

coding question using array manipulation and string manipulation