Okay I don't understand what's going on.
This guy https://github.com/alirezasmr/Dragon-Book-Solutions/blob/master/ch05/5.4/5.4.md (first picture) claims to have solved an exercise, yet his solution pretty much looks recursive to the left to me anyway.
I solved it on the second picture. Am I correct or what?