Brillio Interview Question

Dsa question on array ans string