Pergunta de entrevista da empresa Indeed

The question was to compress a list.