Recursion would risk a stack overflow if the tree had a height of 1000 or more. Since the typical AOC input file is less than 1000 lines long, I think I’m mostly safe