I think the ideas are very different. My advice was:
Because he said:
Now I took that to mean that out of a list like, ("cat", "planet", "factory", "factory", "factory") the list of unique words should be ("cat", "planet"). But you could certainly make a different list of unique words by removing repeated words, and that might be what is meant. But if you compare every word with every other word, you can find the list I just gave. It's simple logic -- if the first occurrence of the word is the only occurrence, then it is unique. (Sorting is intended to be a bit of a speedup, but I have to admit that it could end up being more trouble than it is worth.)
ETA: cat planet