IBM interview question

String Concatenation, Pattern Matching Array