Skip to content
Advertisement

Tag: preorder

How exactly does return statement work in recursive function?

I’m having a hard time approaching any binary tree questions and most of them are recursive, so I decided to detour and start from the basics again. This is basically the pre-order traversal list. I’ve identified two ways that can give me the correct results if there is at least 1 node, but I’m unsure about the intrinsic differences between

Advertisement