4 ms·
Yeah that's great but what if they can't reverse a binary tree?
by djhworld 8y ago
Yeah that's great but what if they can't reverse a binary tree?
- almost_usual 8y agoYou spend a lot of work days reversing binary trees?
- reddit_clone 8y agoI think he was being facetious. :-)
- WilliamEdward 8y agoI know you're joking but... If i had never heard of a binary tree, saw it for the first time in my interview, and didn't at least have an idea of how to attempt solving it, I'm probably a lousy hire. The quality of attempt is what these hard questions are really about.
- abhishekjha 8y agoLooks like I am gonna have to look at the solution as I don't fully get how to achieve that structure. Recursion is good for a few standard problems but those are just standard problems. We shouldn't try doing every possible thing using recursion, even if it is possible to do so. Also, debugging an iterative solutions comes naturally to me compared to recursion. I guess I don't have the right mental model for how to track recursion/recursive calls.