Pergunta de entrevista da empresa OpenText

Find duplicate words and remove them from a string. ( leetcode easy )