Four decisions, not four definitions
Download this original two-page workbook and spend 15 minutes explaining your choices before reading the model answers on page two.
The scenarios cover case-insensitive tags, deterministic display order, repeated events and identity policy. Each asks you to select a data structure or comparison rule and explain what information it preserves.
What a strong answer includes
- Define what counts as an equivalent value before choosing a comparer.
- Separate membership from ordering: a HashSet does not provide an ordering contract.
- Keep event history separately when duplicates carry meaning.
- Treat identifier normalization as a domain decision, not a universal rule for email addresses.
For case-insensitive technical tags, a HashSet<string> constructed with StringComparer.OrdinalIgnoreCase accepts the first value and returns false from Add for an equivalent case variant. This does not modify the stored spelling. For a stable display, explicitly sort a separate projection.
Review your reasoning
A correct API name is only the beginning. Explain the required equality semantics, whether multiplicity matters, and which output order the caller expects. The answer sheet provides model reasoning for each decision.
Reference: Microsoft HashSet<T> documentation. These are original interview practice exercises, not employer interview questions.