Juul Labs interview question

String and array manipulation exercise