Pergunta de entrevista da empresa Eleviant Tech

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