Advent of Code 2019

I was wondering if anyone else is doing the Advent of Code for 2019? If so we could make a private leaderboard :slight_smile:


Thank you for mentioning this! Seems like a fun thing to do (the exercises; I don’t really care about a leaderboard).

Did anyone participate in previous years? How much time do these exercises roughly take? Do they get harder over time?

(I’m afraid I don’t have time to try to solve them every day if they get harder every day)

They do get harder every day, but if you don’t care about the leaderboard then you don’t have to solve them every day. I usually get behind after a few days and then go back and sort things out later. The exercises from previous years are available (e.g. 2018 - just replace the year in the URL to go back, there are problems back to 2015).

1 Like

Good to know!

(Looking at my calendar for tomorrow I might already fall of the bandwagon on day 2…)

I’ve started today, trying to use shortcuts as much as possible :wink: I’ll see where it gets me


Wow! Are you sure that’s going to work for this kind of thing?

I’m using Swift, as that is my daily language, but I think every “generic” programming language will be easier than shortcuts…

For day 1 I used functional programming (map, reduce) and recursion. Curious what you’ll use!

Calculated day 1 using a dictionary repeat (adding them all to an increasing variable) and it was correct :grimacing:

Impressed! You managed to do both exercises for day 1 in Shortcuts?

I did the first one Sunday morning, doing the second bit today (if I have time), but as far as I can see it can all be done using shortcuts. (for day one)

I am now. :slight_smile:

Hope it’s rookie-friendly…

The ones last year got pretty deep into algorithms, which is not rookie friendly. That said, they have a subreddit where there are daily solution threads and lots of discussion. If you’re new to programming or rarely work with algorithms (like me!) then I highly recommend “cheating” to find out what to do so you can concentrate on the how :slight_smile:


In a Playground.

Can’t believe how slow that was to search that 100 x 100 input space for exercise 2b… :astonished:

Survived the first three days, so fingers crossed. :slight_smile: :crossed_fingers:

Definitely gonna have to dig into that subreddit, though. Pretty sure Day 3 shouldn’t need 10+ minutes to run and there is a way better solution out there than mine. Still, I did get the answer at least…and got some other chores done while I was waiting for it!

Thanks for sharing; I’ve just started a computer science degree this trimester, so it seems like a good idea to get some practice in Python, which we have to use for our first subject and I haven’t touched for years (and only barely back then). So far our tutorial tasks have lacked a certain degree of “challenging”. But this looks like it will make up for that. :slight_smile:

And as a bonus, since I’m officially studying now I can spend as much time as I like fiddling with automation and fun things like this and not feel guilty because it’s “practice”! I am being “studious”! :partying_face:

Would be keen for a private leaderboard because, well, why not? :wink:

1 Like

Moving the sources into the “Sources” folder results in the files being pre-compiled and OK speed.

So learned something new! :smile:

Fun, isn’t it :slight_smile:
I’m taking my time (work related), but am still hopng to use shortcuts as much as I can…

How’s everybody doing?

I’m back on the bandwagon (16 stars on day 8), but I had a hard time in solving the second part of day 7…

I’m using thread-safe queues to pass results between Intcode amplifiers that run in parallel (and it took me really long to realise that these queues should be thread-safe…).

Can it be done easier?

1 Like

Unfortunately I haven’t had time yet, but planning to make up the lost days by the end of the week.

1 Like

I’ve been trying to do it. Did day 1 but really had to review a ton reviewing other solutions in my language of choice to be able to actually implement what I wanted. I knew what had to happen, just not how to write it.

Day 2 on the other hand i sat there for an hour and even after reading people’s solutions I wasn’t sure what they were actually telling the computer to do but I did understand how it wanted things.

I have my solution on GitHub if anyone cares.

I’m getting the impression that the day two instructions were worded confusingly, because I’m trying to catch up now and spent about an hour getting nowhere on part two!

Still surviving, but some of the puzzles are taking me a little while and my solutions, though working, are definitely inefficient and inelegant. That leaderboard blows my mind…I don’t know how there’s even time to read the instructions in those times… :slight_smile:

I haven’t attempted the second puzzle from today and it’s past my bedtime, but other than that I am up to date and am determined to persist. I am pleased with myself for making it this far!

1 Like