Earlier quoted context omitted.
Well, to pick on Valeri, this is simply wrong Trees are the single most important data structure in computer science. Just about everything you do in your programming career will be related to trees. Trees are a horrid data structure for any modern processor. Pointer chasing thrashes caches. The actual most important data structure is a hashmap. The same speed in theory, much faster in practice.
How do you represent hierarchical data in a single hashmap?
I Don't Want to Hire You If You Can't Reverse a Binary Tree
51–60 of 115 posts
Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#52Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#53Earlier quoted context omitted.
That's missing the point of the article. The author says that the candidate's thought process behind arriving at the solution provides insight into the candidate's skill. There's no reason to implement your own binary tree, but knowing how to devise algorithms to accomplish a given task is a necessary competency.
Reversing a binary search tree is a binary (pun intended) answer: you either know how to do it because you learned it in college/read Cracking the Coding Interview, or you don't.
Assuming someone is a good programmer because of trivial examples like reversing a binary tree or, worse, writing a bubble sort is like asking someone you to use a wrench to prove that you're an architect.
Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#54Couldn't disagree more with the author. How many developers need to implement their own binary-tree? This is why code-bases become convoluted with six different implementations of standard data structures.
That's missing the point of the article. The author says that the candidate's thought process behind arriving at the solution provides insight into the candidate's skill. There's no reason to implement your own binary tree, but knowing how to devise algorithms to accomplish a given task is a necessary competency.
I don't think that being able to describe an algorithm you haven't had to implement in more than decade (at least, that would be the case for me, college is starting to be a long time ago for me).
Honestly right now, without looking up the answer, I probably can't reverse a binary tree on a whiteboard. I could, however, do it by test driving a solution with a real computer (I haven't flexed those muscles in a long time, but test driving would help me dig into the recesses of my brain).
Which skill set is more useful for production quality software? I can say for sure that it's not white boarding.
Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#55Sigh. If you hire using know it or not questions about binary trees, then you finally get to hire people who can study up and answer that specific question in a manner Pavlov would approve of. That does not mean the candidate will be able to design clean APIs, know how best work with different types of data, or even how to troubleshoot existing code. Still, pat yourself on the back, I mean, your entire team can answe…
How is that a "trick" question? I never been asked that in an interview question and had the correct solution in my head in just a few seconds for the very reason he gives -- experienced programmers can map their intuition to code. This is certainly a skill that takes time to develop, and if you're concerned with hiring the best, don't you think this is a decent heuristic to throw in with a bunch of others ? Programm…
These kind of tests are aiming to find developers who can think out of the box and start solving problems they haven't heard of before. This is quite a simple problem to solve if you start thinking about it. If you get stuck because of the binary tree and because you've never done that before, then I believe you would be a mediocre dev (which is not a problem in many companies).
Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#56I lost him at: "I think homebrew is an awful piece of software that should never be used by anyone."
I wish he'd give some points as to why Homebrew is an awful piece of software. To date, I've had 0 issues...
Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#57It's all about context. If your software team works on code with lots of binary trees, interview questions about them makes a ton of sense. If your software team is making a website that just displays stuff from databases and web services, interview questions about binary trees makes no sense at all.
Not really, because anyone reasonably competent could be up to speed on tree operations in an afternoon on the job. Interviewing them to see if they already know likely takes more energy than having them learn about them.
That holds true for lots of things. "You say you haven't used GitLab. Too bad: that's what we use so we'll have to hire someone else." "Huh? I'm pretty sure I can figure it out in a couple of hours." "Nope. We need someone ready to hit the ground running."
Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#58The truth is that interviews should test the skills your job actually requires. For a variety of skills outside of that core, it is valuable to have someone on your team who understands it for other people to go to. But if you're not doing algorithms all the time, you don't need or want everyone to have mastered that.
And I say this as someone who knows algorithms well enough to pass his interview.
Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#59I think some folks get hung up on the idea that the answer to one question can be used as a go/no-go for a hire decision. Its never that simple, there's a lot more to consider, and the vast majority of candidates will bomb a technical question or two eventually. For those of you that are job hunting right now... don't get bent out of shape, there are plenty of employers that won't hinge their acceptance on one techni…
Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#60I lost him at: "I think homebrew is an awful piece of software that should never be used by anyone."