Hacker News new | ask | show | jobs
by Joker_vD 1900 days ago
Why would you even want to reverse a binary tree in the first place? Simply traverse it backwards, it's just as fast.
1 comments

Maybe you’re passing it to some other function that doesn’t do that, or you don’t want to add some ordering flag to the datatype because that complicates things.

But the purpose of the question of course is to be an easy question showing basic competency in recursion and pointer usage.