Multiple choice technology architecture

Which would be most suitable for storing data elements that must not appear in the store more than once, if searching is not a priority?

  1. Collection

  2. List

  3. Set

  4. Map

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

A Map stores key-value pairs and ensures keys are unique - attempting to store a duplicate key replaces the old entry, effectively preventing duplicates. Collection and List allow duplicates, Set prevents duplicates but doesn't offer key-value mapping. Since the requirement is uniqueness and searching isn't a priority, Map is most suitable.