IBM Interview Question

The question can be based on string and array