Pregunta de entrevista de Eleviant Tech

train ticket processing code, remove the largest sub-word from the string