Pregunta de entrevista de Bank of America

Questions on string manipulation, oops and puzzles