Pregunta de entrevista de Murex

Three leetcodes, two is the string and another is array