:date: 2023-12-09 12:00
Smelled like simple recursion and simple recursion it was. The actual data set didn't do something awful like go past the recursion depth limit which I could easily imagine. Python was the easy way to implement it and it worked fine.
For a change, the part B needed only some quick minor edits. Ran in 102ms.