Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEA
@KyleCollins wrote:Got the answer as shown in the output, but this was assuming that everyone was giving to and receiving from the same person. Wouldn't a true secret santa have 50 random pairings?
Great Point! If your match is also your Secret Santa, it's not much of a secret, is it? I might need to recreate my workflow
UPDATE: Here's my updated workflow. This will provide 50 unique results, randomized with every run, and the "scroogieness" will never be greater than 13.
As bsanson points out, pairings aren't very secret if you know the person you're gifting to is your secret santa. The best answer is 50 unique rows, not 25 pairs. And each run in this module creates new pairs.
Merry Christmas! Here's my solution:
Very fun challenge! I actually took a slightly different approach than the solution that wasn't really "Secret" Santa, since each person knew who they would receive a present from. My workflow instead creates 50 unique pairs (sometimes there will be duplicated pairs, but it would be by chance through random number generation).
I created two very simple solutions, one that generates 25 Secret Santa pairs that are assigned to each other, and one that assigns a truly Secret Santa for each of the 50 people on the list.
This one was pretty fun! I did it both ways (method #1: simple match with 25 pairs, and method #2: secret match with 50 unique pairs). I may have gone overboard on method #2, but wanted to ensure unique pairs (with no givers/receivers buying for each other), while also minimizing the net scrooginess.