https://adventofcode.com/2025/day/7 How I solved? I'm trying to follow the beej's guide approach. Understand. Plan. Code. Reflect. What is my understanding of this problem? A particle flows down - when it hits the splitter - it gets split in 2 paths. For part 1, they have asked how many times the particle splits. What I did? I have went through each row - if I see a . - i just replace it with | if the above neighbour is a |. If I see a ^ splitter then in the bottom left and right below I update them to | as they split into 2. I increment split count. There could be an edge case where the below row left or right could contain ^ but that case didn't occur for me. For part 2, they gave the twist - quantum thing - so particle goes either left or right - i need to find out the number of timelines the particle takes to reach the bottom. I did the naive approach - recursive one - when particle reaches a splitter - for left and right respectively i do a recursive call with the updated data…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.