I used a u8, one bit per level to do mine, but because not all bits correspond to a splitter, it ends up duplicating a lot of the paths. Which is why I made the lowest bit at the top, so it flip-flops a lot, giving the appearance of multiple different paths :D
That's awesome, is it just random paths?
Its very festive :)
Its all a blur...
Showing the of it filling in a bit clearer (or less clearer, i dunno): https://youtube.com/shorts/dBYAdRyhCLU
I use usize by default, but last year there was a challenge that significantly improved performance when I switched from usize to u8 (don't recall which one though).
Video of each path (for the short example, dont think i can do the long one) https://youtube.com/shorts/jLpiUOSIiNw
Day 7 - Colourised, single image.

Rust
Not too difficult, but my pt1 approach didnt work for pt2. Small amount of tweaking and it was back in action. This should be a really good one for visualisations, so I am definitely going to try do something. Maybe colorise the nodes based on how many paths go through it? Definitely an animation of the trickle down. Looking forward to seeing everyone elses visualisations as well!
spoiler
#[test]
fn test_y2025_day7_part2() {
let input = include_str!("../../input/2025/day_7.txt");
let mut rows = input
.lines()
.map(|l| {
l.chars()
.map(|c| match c {
'S' | '|' => 1isize,
'^' => -1isize,
_ => 0isize,
})
.collect::<Vec<isize>>()
})
.collect::<Vec<Vec<isize>>>();
let width = rows[0].len();
for i in 1..rows.len() {
for j in 0..width {
if rows[i - 1][j] >= 1 {
if rows[i][j] == -1 {
rows[i][j - 1] += rows[i - 1][j];
rows[i][j + 1] += rows[i - 1][j];
} else {
rows[i][j] += rows[i - 1][j];
}
}
}
}
print_tree(&rows);
let total: isize = rows.pop().unwrap().iter().sum();
println!("Total: {}", total);
}
Rust
Not an easy one, mostly because I messed up my merge circuits function (Pop/remove first circuit, load into second, but the pop/remove messed up the indexes, so I was merging the wrong thing).
After getting that it was all good. Pt2 was trivial once pt1 was solved.
spoiler