Pregunta de entrevista de JPMorganChase

coding questions I got focused on strings