Fork me on GitHub

Anyone have any tips for day 22 part 2? I think I need to revisit my algebra courses. Put possible spoilers in thread.


In noticed both the number of cards in the deck and the number of times you repeat the shuffle process are prime numbers.

Alper Cugun21:12:59

I hope nobody minds me posting AoC as far back as this but after the rough start on part 1, assembling the part 2 solution from its components was a breeze.


Phew, finally solved today. Spent so much time going in wrong directions… I put the explanation in a comment


thanks. i wasn't aware of modular inverse and that's why my division made the different answer..