Huh, I was asked that very same tree traversal question at an interview recently.
Job interviews go both ways (2011)
21–30 of 82 posts
Re: Job interviews go both ways (2011)
#22Re: Job interviews go both ways (2011)
#23Re: Job interviews go both ways (2011)
#24Huh, I was asked that very same tree traversal question at an interview recently.
Can anyone outline a solution? The only ones I can come up with off the top of my head involve using a stack.
Re: Job interviews go both ways (2011)
#25This is why I hate those services that have an automated pre-screen process. The ones where you visit a specific URL and after reading the questions you record a 30 second video with your answer. The massive hole there is that I don't get to interview anyone the company to see if I feel like its a good fit. I'm sure its saves them time but it wastes mine.
To be honest, it sounds like a net lose -- it's a definite negative for a candidate, with perhaps not much benefit for the company (high noise, high false negatives due to the awkward environment).
My gut feeling is that I would immediately reject any company that asked me to do that, if I had the choice.
Re: Job interviews go both ways (2011)
#26The author advocates questioning the interviewer directly, but he doesn't mention questioning anyone in his Netscape interview, only making mental notes of various red flags. In practice, I think that's the way 'both way' interviews generally have to go - you don't interview your interviewer, but you do evaluate and judge your potential employer critically. Personally, my attempts at interviewing an interviewer have…
I think a better way to ask your first question would be: "What would you say separates the strongest and the weakest members of your team?" It allows you to get a sense of what they value in the team without needing to make them get defensive over staff they probably worked hard to acquire.
It's easy to reply to this phrasing with a canned answer and very little though. "Experience, skill, and a positive attitude." If someone gave this answer to you and you're the candidate asking the question it is basically 0 information.
I think the better way to ask this question is to ask
"Has anyone been recently let go and why? Has anyone been let go or put on a performance improvement plan for not being a good enough engineer? What are specific reasons why you think they were maybe not good enough? What is your policy when programmers make big mistakes?"
I'm not sure I would ask these questions, but I still think it's a better form of phrasing. You want to know what they think makes a bad engineer.
Re: Job interviews go both ways (2011)
#27Earlier quoted context omitted.
I think a better way to ask your first question would be: "What would you say separates the strongest and the weakest members of your team?" It allows you to get a sense of what they value in the team without needing to make them get defensive over staff they probably worked hard to acquire.
> "What would you say separates the strongest and the weakest members of your team?" It's easy to reply to this phrasing with a canned answer and very little though. "Experience, skill, and a positive attitude." If someone gave this answer to you and you're the candidate asking the question it is basically 0 information. I think the better way to ask this question is to ask "Has anyone been recently let go and why? H…
Re: Job interviews go both ways (2011)
#28Huh, I was asked that very same tree traversal question at an interview recently.
Can anyone outline a solution? The only ones I can come up with off the top of my head involve using a stack.
In-order traversal is pretty easy without a stack, if every node keeps track of its parent. 1. go down left branches until you get to a leaf. 2. visit leaf, and go up. 3a. if, in going up, you were at a left child, visit this node, then go right. loop to 1. 3b. if, in going up, you were at a right child, go up again. loop to 3. 3c. if you can't go up, you're done.
The trick comes from not really storing the parent pointer at each node, but instead doing trickery with xor-ing various addresses together so that you can store 3 pointers in the space of 2 (plus possibly an extra bit).
Of course, if you do so, you've constructed something that's not exactly a binary tree, and can only be traversed in certain fashions where you'll always have the necessary information to xor.
Re: Job interviews go both ways (2011)
#29Re: Job interviews go both ways (2011)
#30Did I ever mention that interview with a whizzo East Coast startup where the interviewer couldn't answer where the company was planning to be in five years time? It's one of those questions where they will squirm like eels, but you have to know, because you are committing your time and future earnings to them. Squirming is fine, but being struck dumb is not acceptable. The experience was epic, it ended with a greybea…