InterviewDB Experience

Secret Santa: Assign Secret Santa Pairs with Exclusion Constraints Using Graph Matching

Interview Experience

Problem Given a list of participants and an exclusion list (pairs who should not be matched, e.g., couples or family members), generate a valid Secret Santa assignment where every person gives to exactly one other person, receives from exactly one person, and no exclusion is violated. Example: Follow-ups How do you model this as a graph problem (directed Hamilton cycle with forbidden edges)? When is a valid assignment impossible? Give a minimal example. How would you ensure the assignment is uni…

Full Details

🔒

Unlock all Nextdoor questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a candidate experience report from a nextdoor interview during the phone round.

It covers the following topics: Coding, Graph, Phone, Onsite .