Shopify: Gift-exchange pairing from a CSV with exclusion rules
Problem. Read gift-exchange participants from a CSV file and print who gives to whom. Every person gives exactly one gift and receives exactly one, and nobody can be assigned to themselves.
Follow-up. Add restrictions on who may give to whom. In one test case a recipient had only a single allowed giver, which forces that pairing and can make naive random or greedy assignment fail. At that point the problem becomes a constrained matching problem.
Format. A technical screen where AI assistance was allowed. The post gives no input format details beyond the CSV and no size limits.
Candidate's takeaway. The AI suggested two algorithms the candidate did not know, and understanding them live was hard. Their advice is to practise with the AI tool beforehand rather than counting on it during the interview. They passed and were invited to four final rounds.
Comments 0
No comments yet. Ask the author something, or add what happened in your own round.