Pregunta de entrevista de Eurofins

Given a coding questions to solve with time bound mostly based on string and array manipulation