2021 Day 22 How to think about the problem

  1. AABB is probably the most natural solution, but actually not the fastest way, which is tracking intersections

  2. I did that, yielding 27 sub-cuboids to filter, but worst case that's 26 for a subtraction. Generating up to 6 cuboids in a fixed layout is much less fancy but faster.

  3. Aarrrgh. I now know what those stupid sounding classes were that I avoided because they sounded like something rendering related. I guess that if you know what AABB is, then a class called "AABB3" is self-explanatory.

  4. I did something like this, but even after optimizing it as much as I could, it takes 20 minutes to run Part 2 for my input on 16 cores.

Leave a Reply

Your email address will not be published. Required fields are marked *