6
votes
Day 23: Amphipod
Today's problem description: https://adventofcode.com/2021/day/23
Please post your solutions in your own top-level comment. Here's a template you can copy-paste into your comment to format it nicely, with the code collapsed by default inside an expandable section with syntax highlighting (you can replace python
with any of the "short names" listed in this page of supported languages):
<details>
<summary>Part 1</summary>
```python
Your code here.
```
</details>
Rust
This was a tough one, but I finally wrapped it up and optimized the solution somewhat.
The solution initially took 4 minutes for part 1 and 5 minutes for part 2. After a lot of optimizations and caching I've gotten it down to 10 seconds for part 1 and 17 seconds for part 2.
Rust