Hacker News new | ask | show | jobs
by jkaptur 3281 days ago
I don't get it. Programmers are surrounded by trees. The filesystem, your code's AST, dependency trees, the HTML DOM, any JSON ... why do people consider it so unreasonable to ask a question about simple manipulation of a well-understood tree data structure?
3 comments

Unless you're writing a database or browser engine, you will never have to implement a binary tree. So it is effectively trivia knowledge. It's like asking how the x86 CPU architecture works, because it's the platform on which most code runs.
Because it implicitly selects for inexperienced/mediocre candidates over experienced ones.

Even among people who did a degree that involved implementing these algorithms, 99% or more will never do it again once they set foot off their campus, because they'll just use a library that already has it implemented. Then they'll free up room in their brain's working set for the stuff they actually do have to implement. And the longer they go like that, the longer it'll take and the more difficult it'll be to find where all those tree algorithms got paged out to in their brain, and the worse they'll look on an interview which consists solely of asking for that stuff.

Meanwhile, the inexperienced and likely unqualified (given what people claim about the average CS graduate) person who just walked out of their college graduation still has it fresh and ready to regurgitate onto your whiteboard, and passes with flying colors: great technical skills, great "fundamentals", A+++++ hire ASAP!

The solution to this is to stop using proxies for the thing you want to know, and start actually testing for the thing you want to know.

It would be reasonable to ask tree related questions. If the questions falls within a normal use case. Traversing a filesystem is something you should be familiar with. Reversing a binary tree. No