Pergunta de entrevista da empresa Logic Eastern

Based on string ,array, collection and the pattern program .all are the easy question