Live data from Hacker News

Ask HN: What are the best interview questions you've been asked?

news.ycombinator.com

21–30 of 63 posts

Re: Ask HN: What are the best interview questions you've been asked?

#21
A very senior guy comes in the room where I am with a very concentrated look on his face and my resume in his hand. On my resume its mentioned that I have a lot of experience bringing security relevant concepts to inexperienced people.

So he describes a problem hes actually working through when he was "interrupted" to come interview me. He was trying to terminate an SSL connection, modify the stream (for video manipulation) and send it along to the client. I explained public key and how what he wanted to do was called a MitM attack and how he couldn't continue on the stream without the private key of the server. We had a real conversation with me explaining (to a very smart guy) so he could completely understand everything he "needed" to know to solve the problem he was working on.

I got the job. It was the only interview I've had where I really felt they were asking me something relevant to the work and the kind of work I would be required to do. I ended up having to write Symbian OS code, which I had no prior experience in.

TBH most of the comments so far are the interview questions I hate as they have no relevance to anything I care about or will ever be asked to do.

Re: Ask HN: What are the best interview questions you've been asked?

#22
post #12
post #6

one i really enjoyed solving: given an array of size (n - 1), containing all but one of the numbers between 1 and n, find the missing number in linear time and constant space.

Strict requirements (like linear and constant) give so much away about the nature of the solution. "What's the best you can do within ..." adds an extra challenge - in particular I don't think I'd often see the constant space solution as perhaps one in logspace.

yeah, i was paraphrasing a bit. how the actual interview went was i was asked to simply find the missing number, i came up with the log space solution pretty quickly, the interviewer then asked if i could do better than that, and it took me a bit of thinking to come up with the constant space answer.

Re: Ask HN: What are the best interview questions you've been asked?

#24

Find the minimum value in the stack in O(1) both time and space complexity.

Have a few questions .. (1) doesn't it seem like this only works for elements that have an ordering as well a binary operation multiplication, subtraction and addition defined on them, making it too specific ? (I'm talking about the whole 2x - minelement) (2) If I have a variable hanging around a stack, is it still a stack? (3) When I pop out the min value in the stack, and want the next min Value, how do I get that,? seems like the previous min value still sticks around? (4) With comparisons and 1 value that hols state, do I really need to transform the values going into the stack?

Re: Ask HN: What are the best interview questions you've been asked?

#27
post #21

A very senior guy comes in the room where I am with a very concentrated look on his face and my resume in his hand. On my resume its mentioned that I have a lot of experience bringing security relevant concepts to inexperienced people. So he describes a problem hes actually working through when he was "interrupted" to come interview me. He was trying to terminate an SSL connection, modify the stream (for video manipu…

A very senior dev had to be explained he couldn't do a man-in-the-middle attack on an encrypted stream without the server's private key? With all due respect and I don't know much about security but something seems off, maybe you haven't explained the whole story or maybe I'm getting something wrong.

Re: Ask HN: What are the best interview questions you've been asked?

#28

Majority of the interview questions for software developers are retarded. It's either too academic (reverse a linked list) or too specific (What is the difference between StringBuffer and StringBuilder in Java?). To answer your question - none.

Being too specific is only bad unless you have not listed as your experience in the domain.

But being too academic is actually good. The academic questions are constants irrespective of the domain in which the coding is done.

Re: Ask HN: What are the best interview questions you've been asked?

#30
post #6

one i really enjoyed solving: given an array of size (n - 1), containing all but one of the numbers between 1 and n, find the missing number in linear time and constant space.

I really enjoyed solving that. It didn't take very long at all (but was very satisfying!). It reminds me of an old story (of which I can't verify) about Gauss while in school solving a summation using a very neat observation.

Enough said!

Post reply on HN