Can a set have duplicate elements?

set

Solution

Let A={1,2,2,3,4,5,6,7,...} and B={1,2,3,4,5,6,7,...} then any element in A is in B and any element in B is in A ==> A contains B and B contains A ==> A=B. So of course sets can have duplicate elements, it's just that the one with duplicate elements would end up being exactly the same as the one without duplicate elements.

Problem

I have been asked a question that is a little ambiguous for my coursework. ``` The array of strings is regarded as a set, i.e. unordered. ``` I'm not sure whether I need to remove duplicates from this array? I've tried googling but one place will tell me something different to the next. Any help would be appreciated.

Original source