Anonymous interview question

Arrays ,strings, pattern based scenarios etc