Pregunta de entrevista de Persistent Systems

1 coding question on strings