>>107153136
NTA, but doing it without recursion and with a manual stack is much better since you won't overflow the call stack on a very deep tree.