And for each state in the queue you must enqueue a new state for every piece*permutation. It can grow quickly. In aoc in general I just keep 10k or 20k items in the queue and it works.
I found some people with the actual solution claiming less than 3 minutes runtime in python so I guess it’s not that hard. Gosh I’m way too lazy to give it a try now ![]()






















