I just completed "Laboratories" - Day 7 - Advent of Code 2025 #AdventOfCode https://adventofcode.com/2025/day/7
Got to use my #SwiftLang Graph data structure created originally as a demo for students. Later used as a tool to generate exam questions.
Part 1: took some time to understand what does it mean when the talk about "...how many times the beam was split". Once I got that, it was easy to get those vertices that have an incoming edge (are a destination in an edge).
Part 2 took long to execute, wonder if there's something I should / could do about that... Not gonna (again), there's catching up to do. Here I needed to change how the graph was generated (allowing multiple edges along the same downwards route of beams), and some help (internet searches, no AI) to find out how to calculate distinct number of paths from the starting vertex to destination vertices, using memoization.
Executing Advent of Code challenge 7...
...
Part 1 took 1.341789292 seconds, part 2 took 25.035749 seconds.