#WEEKLY 7
h
Coder100 (6515)

WEEKLY 7

Hello everyone! I did it! I thought about the challenge all night yesterday (even while dreaming) and so here's the solution!

Enjoy! The golfed version is in yeet.js. As always, I have added colors to the output!

Walkthrough

I made a log of the occurrences of each number, and then removed the ones that had only 1 occurrence. The rest were then made into an array using a magical Array.fill() technique and then Array.concated together.
update
I made a log of the occurrences of each number, and then removed the ones that had only 1 occurrence. The rest were then made into an array using a magical Array.fill() technique and then Array.concated together. After that, I found all the subsets of that array and then removed the ones that didn't fit the requirements. The process is actually quite fast in my opinion!

Have a great day!

Yeet

Updates

You are viewing a single comment. View All
AmazingMech2418 (840)

@Coder100 Though, I think what it is is that you are supposed to just print all of the subsets which satisfy the condition of all numbers being displayed an even number of times. (and of course, without duplicates, disregarding the order in the set as well (for example, you wouldn't do [2, 1, 2, 1] and [1, 2, 1, 2]).