Collapse the Duplicate Record Ids

Basic

A trigger collects record Ids that may repeat across rows. Before a query you need the distinct Ids only.

Implement `solve(List<Id> input)` to return a Set of the unique Ids.

Examples

Input[001...1, 001...1, 001...2]
Output{001...1, 001...2}
Input[001...3]
Output{001...3}
Hints
  • A Set built from a List deduplicates automatically.
Anonymous Apex

Your code runs in a secure sandbox against multiple hidden test cases. The problem is solved only when every test passes. Each run is isolated and any data changes are rolled back automatically.