AIS interview question

coding question about strings and array