I got only Part B wrong, but I have no idea why. C...
# advent-of-code
l
I got only Part B wrong, but I have no idea why. Code from @andyb works fine with different result. So maybe I didn't understand the question correctly, although for their example input for part B my result is correct.
j
I think the problem might be that you're moving all carts, then checking for collisions. You should remove collided carts immediately after each move, not wait until the tick has finished.
l
Ah, thanks for the tip, will try it 🙂
It turned out that you were right! Thanks for the good tip 🙂