Accenture Interview Question

Coding question on strings and arrays