Skip to content

nicole-tang/secret_santa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Secret santa: assign a person for each participant. Condition:

  1. participants cannot be assigned to themselves
  2. participants cannot be assigned to their partners

The structure of the input is a dictionary of {participant: their partner}

input = { "a@santa.com": "a1@outsider.com", "b@santa.com": "b1@outsider.com", "c@santa.com": "c1@outsider.com", "d@santa.com": "d1@outsider.com", "a1@outsider.com": "a@santa.com", "b1@outsider.com": "b@santa.com", "c1@outsider.com": "c@santa.com", "d1@outsider.com": "d@santa.com", }

The structure of the output is a list of (participant, person they have to get the gift to) output = [ ('a@santa.com', 'b1@outsider.com'), ('b@santa.com', 'd1@outsider.com'), ('c@santa.com', 'a1@outsider.com'), ('d@santa.com', 'c1@outsider.com'), ('a1@outsider.com', 'd@santa.com'), ('b1@outsider.com', 'c@santa.com'), ('c1@outsider.com', 'a@santa.com'), ('d1@outsider.com', 'b@santa.com') ]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages