Pregunta de entrevista de Logic Eastern

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