I Don't Want to Hire You If You Can't Reverse a Binary Tree
21–30 of 115 posts
Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#22Couldn'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.
Agreed. Why not use a realistic problem and setting?
Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#23Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#24Sigh. 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…
The article author doesn't think of his question as a "know it or not" question, but a "you should be able to figure this out" question:
> Here's the first reason why this question is so good: a skilled programmer can map their intuition to code. You can tell at a glance whether a binary tree is symmetric, but beginners will often struggle with a question like this because they approach this problem from a visual/intuitive angle rather than the logical angle.
I think it's a fair criticism to say that, at this point, "reverse a binary tree" is something a lot of applicants will have simply memorized rather than figuring out on the fly. But (to play Devil's Advocate) isn't the goal of the question - to test a candidate's ability to think logically and problem-solve on the fly - a reasonable one?
It seems to me the real problems with whiteboard-coding interviews aren't that what they're trying to test - problem-solving on the fly - isn't useful or valuable, but that whiteboard coding is confounded by so many irrelevant variables: ability to think under pressure, ability to code "in your head" (without an editor, IDE or REPL), memorizing solutions, and so forth.
Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#25And yet I've never professionally had to reverse one or know if they are symmetrical.
Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#26I lost him at: "I think homebrew is an awful piece of software that should never be used by anyone."
Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#27Sigh. 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…
Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#28Couldn'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.
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.Re: I Don't Want to Hire You If You Can't Reverse a Binary Tree
#29Sigh. 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…
Programmers are so sensitive, and honestly all your "sighing" is obnoxious. You don't have it all figured out.