We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback

Challenge #144: Secret Santa Assignments (BAH HUMBUG!)

8 - Asteroid

Conditions met!




8 - Asteroid


8 - Asteroid

I'm a little past Christmas-time!

8 - Asteroid


8 - Asteroid


8 - Asteroid


8 - Asteroid

This threw me for a loop. Had to look at some solutions for inspiration. Found that from my logic standpoint it made sense to generate random keys for each individual at the start. This means, everytime this flow runs every person involved with start from a random assignment in terms of ordering. Then split into top and bottom 50% based on those random numbers. At this point we have ensured we have no overlap in persons in either group and can then sort by their scrooginess score asc and desc and provide unique IDs to each set of names. Since lists are the same size these will provide duplicate keys across dataset on which they can be joined. At this point we can then calculate the NSS (net scrooge score) then finally select name emails and net score.


This only works for this set because there is a split in NSS which would result in none above 13 if you split high and low. This will not work in terms of NSS if you had, for example, a set of team members whose NSS were possibly skewed to being really Scroogy. If you have, for example, a team where 75% of the team members had a Scroogieness Score (SS) of 8+ and only 25% of them had a score leff than 7, you would not be able to refrain from every combination of NSS being lower than 13. If you had that spread of SS, then I do not think any solution would give you all NSS less than 13 (but this is my digression from the point, just a food for thought item)

5 - Atom

I don't know whether my solution is correct or not because the ordering is not what it's shown in output


8 - Asteroid

I have the same pairings, but with a different column order.

8 - Asteroid


I wasn't sure if this was supposed to be a macro so the list changes every time but since its listed as core I've only used core tools. So this is more a one time use Secret Santa list