Hacker News new | ask | show | jobs
by eudamoniac 33 days ago
I feel the same way about inverting a binary tree, but a lot of people act like it's an arduous request. I am guessing it's because they've never read the description of what inverting a binary tree is, but maybe people are just that bad at recursion.
2 comments

You can go your entire career without recursing, or using a tree data structure in its raw form (i.e. you only use it as part of a library)
Right. For the first many decades of computing, recursion was just always the wrong answer for a production software system. (Feel free to provide a counter-example, but please begin with an explanation of how the size of a call stack frame is determined and how exceeding the base allocation is handled on this platform).

So what tree-traversal/quicksort problems tend to measure is how long it's been since you last did CS class homework problems.

There's no need to put your data on the call stack.
Great. Please explain how the size of a call stack frame is determined and how exceeding the base allocation is handled on the particular platform you're proposing to recurse upon.
I feel like you have not responded to my comment.
Yeah, you read it and expect the inversion to be inside-out or upside-down, defined in some hopelessly arcane way.