It’s a great way to learn or improve your coding skills and I find Observable a great platform for both coding solutions and explaining them. Puzzles are issued daily from December 1st to 25th, gradually getting harder through the month. Many of them lend themselves to some visualization so also a good opportunity to practice Plot, d3, VegaLite etc.
I thought a thread based on this post might be a good place for people to discuss the puzzles as they arise (but beware looking at spoilers if you are still working on a solution).
In case it is of interest, I have several collections containing most of the previous puzzles and some general programming utilities that can be useful for some of puzzles:
Day one was in interesting one. Slightly harder than most opening puzzles from previous years, but good at encouraging careful consideration of edge cases.
Here’s my solution with an attempt to use Observable Plot to show the algorithm:
Day 4 was a relatively easy one (part 2 being somewhat easier than a first reading might suggest. Exponential explosion in card numbers was moderated by the sequence of winning numbers reducing to 0 at regular intervals…
Great stuff! I haven’t looked at any of your notebooks, in case I might try myself (though I only give that about a 1/3 chance). But I’ll be watching your progress in this thread!
Day 5 was unusually challenging for a puzzle within the first week, but satisfying to find a solution that computes the second part in a few milliseconds.
Today I completely revamped my solution for day 17 (the shortest-path puzzle), and generalized the problem with an interactive in “part 3”. I’m now quite happy with the charts:
I’ve just finished . My notebooks are often a complete mess full of broken cells and partial computes. This makes me even more in awe of the series you have published, so clean and polished (and fast). Thanks for sharing!