Live data from Hacker News

I cheated on my Microsoft interview (2019)

facet.net

41–50 of 503 posts

Re: I cheated on my Microsoft interview (2019)

#41

He cheated more on writing a clickbait title than actually "cheating" on the interview. This is the same thing as when a kid in class thought studying was a way to cheat.

Its not cheating but it's absolutely unethical. OP is right that they should have disclosed that they had seen the problem before. It only is that the right thing to do but also good interviewers can tell when you genuinely thought about a problem vs just regurgitated the solution.

Whatever. It's dog eat dog, good on OP.

Re: I cheated on my Microsoft interview (2019)

#42

Unless I'm misreading, the question as stated in the blog post never says there is only one duplicate (there might be many!), so in that sense I think his answer may be wrong. A more robust solution is just to have an array of n counters and just count how many times each item appears.

The length is n+1 and contains all ints 1 through n, so there can only be a single duplicate.

Re: I cheated on my Microsoft interview (2019)

#43
post #28

Earlier quoted context omitted.

Yes, it's a question with a silly trick. Completely useless if one knows the answer, hard to spot if the person feigns struggle. Although, n•(n+1)/2 formula is not necessary. One can start with an xor sum and find the duplicate by xor adding elements again. This is another silly trick.

That’s a very elegant solution. Hard looking problems that had simple, trick solutions were called Jewish Problems at the entrance of some universities. This would let the examiner fail a student for subjective reasons instead of academic success. The examiner would then be able to say « I failed them because of their skills, not because of their religions, look how easy the solution is ». Perhaps this is what we are…

The explanation of the name somehow is a lot better than what I assumed it was referring to. The phrasing on the second sentence is... unfortunate.

Re: I cheated on my Microsoft interview (2019)

#44

Earlier quoted context omitted.

Yes, it's a question with a silly trick. Completely useless if one knows the answer, hard to spot if the person feigns struggle. Although, n•(n+1)/2 formula is not necessary. One can start with an xor sum and find the duplicate by xor adding elements again. This is another silly trick.

Could also just use a hashtable, the keys are the array elements and the items are the occurrence of each element, then return the one with an occurrence of 2.

Or just a hashset and return when about to insert an existing element.

Re: I cheated on my Microsoft interview (2019)

#45
post #28

Earlier quoted context omitted.

Yes, it's a question with a silly trick. Completely useless if one knows the answer, hard to spot if the person feigns struggle. Although, n•(n+1)/2 formula is not necessary. One can start with an xor sum and find the duplicate by xor adding elements again. This is another silly trick.

That’s a very elegant solution. Hard looking problems that had simple, trick solutions were called Jewish Problems at the entrance of some universities. This would let the examiner fail a student for subjective reasons instead of academic success. The examiner would then be able to say « I failed them because of their skills, not because of their religions, look how easy the solution is ». Perhaps this is what we are…

[deleted]

Re: I cheated on my Microsoft interview (2019)

#46
Why are all the other comments so negative and stuck up whether it constituted “cheating” or not? That wasn’t the point of this story.

It was a beautifully well written account on luck and how sometimes the things align. The interviewee at the time was receptive towards the kind of questions that are asked at Microsoft and got the right one. Good luck. And then he passed a 6 hr on-site interview as well! No luck at all!

The story resonated with me.

Re: I cheated on my Microsoft interview (2019)

#47
Recruitment agents are always pumping failed interviewees for the questions they were asked. They then make sure their next candidates are better prepared with this knowledge.

This guy really shouldn't feel so bad. It's Microsoft's fault for not rotating the questions better. That, or they did rotate the questions, and it really was absolute pot luck.

Re: I cheated on my Microsoft interview (2019)

#48
I've had similar experience - in an interview for my current job I got asked same question that I've already encountered in a previous job interview. It must be pretty popular in the area :)

It wasn't hard, and I solved it first time without help so it didn't feel like cheating, but I told the guy afterwards anyway. I did tech interviews from the other side before and from my experience having the perfect answer doesn't matter that much - what matters is showing how you solve problems and that you're familiar with common solutions and trade-offs.

Re: I cheated on my Microsoft interview (2019)

#49
post #43
post #28

Earlier quoted context omitted.

That’s a very elegant solution. Hard looking problems that had simple, trick solutions were called Jewish Problems at the entrance of some universities. This would let the examiner fail a student for subjective reasons instead of academic success. The examiner would then be able to say « I failed them because of their skills, not because of their religions, look how easy the solution is ». Perhaps this is what we are…

The explanation of the name somehow is a lot better than what I assumed it was referring to. The phrasing on the second sentence is... unfortunate.

I’m referring to the easy looking, tricky to solve problems. I’ve heard them referred to by that term because they have been used at Moscow University to discriminate against Jewish students but I don’t know if they have other names.

There is some discussions and examples of such problems at https://arxiv.org/pdf/1110.1556.pdf and http://3038.org/press/shen.pdf.

Re: I cheated on my Microsoft interview (2019)

#50
post #13

I'm surprised that atm there is a consensus in the comments saying that it's not cheating. Companies ask interviewers to not reveal the questions they had to other candidates. It's likely that his friend was told not to say that. Overall he clearly had an unfair advantage, and even if legally it wouldn't be the definition of "cheating" it would go against the intent of the interview: which is to evaluate candidates i…

While I can absolutely see why people would view this as cheating, I'm also not sure what he was suppose to do. It's a case of: "Hey, look, I really want this job so I took the time to prepare and studied the kind of question you might ask. I happen to know the answer to this question, could you ask a new one that I don't know the answer to?" If I where the interviewer, I'd just stop the interview at this point and move the candidate along to the next interview anyway. He's clearly smart enough and has already invested time.

Personally I don't put a ton of value in question like this, so I'm less inclined to view it as cheating, and more like proper preparation... and a bit of luck.

Post reply on HN