
OK call me crazy but I finally got to Day 5 and I want to write a DSL for the intcode computer. Worth it?

Intcode problems are featured every other day, so having a good infrastructure to deal with it is definitely worthwhile. That being said, I don’t think a DSL will really help. So far, the problem statements don’t ask you to program inside the Intcode language. But if you just want to do it for fun, I’d say go for it!

Spoiler - Day 18 Part 1

The best algorithm I can come up for now is O(n^2 * (3^n)). (It’s an adaptation of https://en.wikipedia.org/wiki/Held%E2%80%93Karp_algorithm for this problem).

But n = 26, meaning that it will definitely be too slow. Assuming CPU could run 10^9 instructions per sec, it will take millions seconds to compute an answer

Perhaps it uses the fact that the graph is planar?

Why 3^n?

You either have a key to unlock a door or not.

I just finished the part 1 and I am going leave the part 2 for tomorrow.