Eurofins interview question

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