Quantiphi Interview Question

related to array and strings