Quantiphi interview question

related to array and strings