Python/Django/Postgres Software Engineer, former VP of Engineering based in China . Part time CS&Data Analytics MSc student. 会说中文. Sokath, his eyes uncovered.
I just completed "Like a Rogue" - Day 18 - Advent of Code 2016 adventofcode.com/2016/day/18#AdventOfCode That gets me past 200 stars, not bad as I only had 84 on 1st Dec 20. I doubt I'll carry on at this speed as work resumes tomorrow, but resolved to get to 300 before 1st Dec 21
I (finally) just completed "Monster Messages" - Day 19 - Advent of Code 2020 adventofcode.com/2020/day/19#AdventOfCode For the first time in the three years I've been doing Advent of Code, I have all 48 stars going into Christmas day! ⭐️⭐️
've still not looked up what Chinese Remainder Theorem us, so I doubt that that's what I've done, but my code still cracks Day 13 Part 2 in under 1ms, so that's definitely a win #AdventOfCode
The Python deque makes tracking rotation a breeze. The first time I saw anyone using complex numbers to store coordinates was in #AdventOfCode 2018 and I've used it a few times since - it can be much simpler than maintaining separate x and y coordinates.
Just realised that I missed the obvious trick that the row is essentially * 8 already as its shifted across 3 columns, so the slicing and multiplication can be removed also. That's what I get for coding at 5am on a Saturday.