Answer is : A..Why ??
Update: The above statement is wrong.
Saibabaa Pragada wrote:Map & Hashtable also doesn't allow duplicate elements know ??
From the API: A map cannot contain duplicate keys; each key can map to at most one value. And Hashtable IS-A Map
Saibabaa Pragada wrote:Hi Mohammed, A map cannot contain duplicate keys. Set cannot contain duplicate elements. So, I am thinking all the options should be correct. Did I miss any part that you are saying?
Ah Am really sorry- Misread the question and details . Its given that: if searching is not a priority - So we can think of using Set. So the second details given is important to note.
Saibabaa Pragada wrote:if searching is not a priority, Why we should think of using Set ? I am not clear on the logic behind that
Maps help in searching by using the keys. For Set- You would have to iterate through the set.