Avanza interview question

remove duplicate words from string