Live data from Hacker News

I cheated on my Microsoft interview (2019)

facet.net

11–20 of 503 posts

Re: I cheated on my Microsoft interview (2019)

#11
Arrest this man! How dare you practice for an interview? /s

Granted some people practice 100+ questions, you practiced only 1, and it was the right one. Same same.

Lucky indeed, but I wouldn't attribute your success to luck. You were clearly a good enough engineer to receive 2 offers, and good enough to build a career there.

We all have multiple encounters with low-probability scenarios in life. If you have a 10% chance of succeeding at something, and you have 50 attempts, and you only need one success, then your actual chance of succeeding is 99.5% rather than 10% - almost inevitable.

Re: I cheated on my Microsoft interview (2019)

#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 in front of a new problem.

Kudos to the author for being honest about all this. I think it's a real issue and that we should find more solutions to prevent this than candidates signing an NDA. Imho when doing such interview, questions should not rely on a "trick" and even if they do, candidates should be evaluated on everything else: how they explain the code, how they react to feedbacks, how easily they transcribe what they explain to code. It's not perfect but it helps.

Re: I cheated on my Microsoft interview (2019)

#14
I would not have though to use this formula. The sum of the integers grows as the square of n so if n is anything but small you will overflow and get an erroneous answer.

This interview question has everything bad imo: no practical uses, test knowledge of math formulas (which every math/CS major would have but none of the self learning folks). It’s very easy to stress and fail when given such a test, and even already knowing I would have tried something else because of the overflow.

Re: I cheated on my Microsoft interview (2019)

#15
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…

A good example to make this question more fair, as an interviewer, would be to rapidly give the (n-1)*n/2 trick quickly if the candidate doesn't know it. And not care too much if they do know it.

Re: I cheated on my Microsoft interview (2019)

#16
Got a chuckle out of the author thinking this was some kind of cardinal sin.

The only person "at fault" here is his friend for telling him what interview question he received and I'd expect companies know this happens, which is one of the benefits of having further interview stages in the first place.

Re: I cheated on my Microsoft interview (2019)

#17
post #14

I would not have though to use this formula. The sum of the integers grows as the square of n so if n is anything but small you will overflow and get an erroneous answer. This interview question has everything bad imo: no practical uses, test knowledge of math formulas (which every math/CS major would have but none of the self learning folks). It’s very easy to stress and fail when given such a test, and even already…

> I would not have though to use this formula. The sum of the integers grows as the square of n so if n is anything but small you will overflow and get an erroneous answer.

As long as you can get wraparound semantics, the overflow is actually unproblematic. (n(n+1)/2 + k) mod 2^32 - (n(n+1)/2 mod 2^32) = k mod 2^32 = k.

Re: I cheated on my Microsoft interview (2019)

#19
post #14

I would not have though to use this formula. The sum of the integers grows as the square of n so if n is anything but small you will overflow and get an erroneous answer. This interview question has everything bad imo: no practical uses, test knowledge of math formulas (which every math/CS major would have but none of the self learning folks). It’s very easy to stress and fail when given such a test, and even already…

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.

Re: I cheated on my Microsoft interview (2019)

#20

Got a chuckle out of the author thinking this was some kind of cardinal sin. The only person "at fault" here is his friend for telling him what interview question he received and I'd expect companies know this happens, which is one of the benefits of having further interview stages in the first place.

I would say the only person “at fault” is the interviewer for using such an awful question. This is precisely the kind of question that gives programming puzzle interviews a bad name. If you’ve heard it before, it’s trivial and proves nothing. If you haven’t, you have to have a clever a-ha moment in order to do anything but brute-force it. “Have you heard this one story about Karl Gauss as a child” is a really terrible hiring criterion.
Post reply on HN