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.
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
littlelightcz
12/13/2018, 2:27 PM
Ah, thanks for the tip, will try it 🙂
littlelightcz
12/13/2018, 7:35 PM
It turned out that you were right! Thanks for the good tip 🙂