#WEEKLY 7
h
Coder100 (6456)

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
Coder100 (6456)

hello, a subset is like

{ 1, 2, 3, 4 }

so, by definition, those subsets are subsets, but he's asking for the subset for all even duplicates, not separate ones

@DynamicSquid