Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is that the right day? My code for 2021:14 runs in 440 microseconds for both parts. 2021:23:2 is the only day I couldn't get under 1 second.

https://github.com/forrestthewoods/aoc2021/blob/master/rust/...



My 2021 day 23 runs in 5 milliseconds for both parts using A* with a custom heuristic: https://github.com/orlp/aoc2021/blob/master/src/bin/day23.rs


I have a writeup of my 2021 solutions at https://programsareproofs.com/articles/aoc_2021.html. I got day 23 down to 31ms using Rust.


I struggled with that one; thanks for linking your code; I’ll have a look and see the trick I missed.


The key is you didn’t need to keep track of the strings, just the counts.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: