Motorola Solutions Interview Question

String and array basic question