News for hackers. Stuff that matters.
Re:My startup failed, then I found out I was unemployable by thu2111 on Wednesday April 14, 2021 @03:29AM (#26804058)
I don't fully get this argument. Trees are a very common thing to encounter in all sorts of programming and recursively walking them is also very common. I had to do it yesterday as part of writing some code to traverse a file system, nothing fancy.

Although I've never asked or been asked it in interview context, reversing a binary tree specifically is probably just checking you understand how to write recursive functions. Binary, because variable number of child nodes would make the code longer and more complex for no good reason. Reverse, because that's the simplest operation you can do at each node.

People in this thread are acting like tree processing is as exotic as theorem proving, and could never have anything imaginable to do with daily work, but every web page is literally a tree!

Re:My startup failed, then I found out I was unemployable by BoorishBears on Wednesday April 14, 2021 @03:38AM (#26804129)
Time complexity often comes up in these problems too, so it's not enough to just know the requisite parts of the problem you need to have memorized specific approaches unless you plan on doing some theory crafting mid interview...

And it's not like you can't find out of the applicant knows recursion and what a tree is without bringing in memorization, there's just some weird obsession with a very specific type of problem which happens to often involve memorization

Re:My startup failed, then I found out I was unemployable by cutemonster on Thursday April 15, 2021 @06:16PM (#26826843)
Agreed that tree algos are common, there's some in an app I'm building. And time complexity trade-offs too.