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.
I cheated on my Microsoft interview (2019)
41–50 of 503 posts
Re: I cheated on my Microsoft interview (2019)
#42Unless 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.
Re: I cheated on my Microsoft interview (2019)
#43Earlier 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…
Re: I cheated on my Microsoft interview (2019)
#44Earlier 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.
Re: I cheated on my Microsoft interview (2019)
#45Earlier 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…
Re: I cheated on my Microsoft interview (2019)
#46It 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)
#47This 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)
#48It 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)
#49Earlier 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.
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)
#50I'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…
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.