Pregunta de entrevista de Liberty Mutual Insurance

Two coding questions with strings/arrays