I cheated on my Microsoft interview (2019)
31–40 of 503 posts
Re: I cheated on my Microsoft interview (2019)
#32 /*
Not sure if this is correct,
but there should be a solution along these lines
will explode if the array contains values outside of 1...n
also, invalidates the array
*/
int v = values[0];
for(;;){
if(v == values[v])return v;
int t = v;
v = values[v];
values[v] = t;
}Re: I cheated on my Microsoft interview (2019)
#33I'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…
Comapre it with people who applied too, but didn't have that "internal" knowledge
Is it fair from that "not well networked" person perspective?
It's not even like he found this question randomly on the internet, he got it from MSFT employee, lol.
I have really mixed feelings about this
Edit.
Don't get me wrong, apparently author was(and is) capable of doing his job, so it isn't a big problem, but what if author wasn't capable of doing the job and passed just due to the advantage?
I know person who told beginner programmer what X company asks on interviews and that guy actually managed to pass that interview due to the knowledge
but was fired like 3 months later due to lack of skills
Re: I cheated on my Microsoft interview (2019)
#34Re: I cheated on my Microsoft interview (2019)
#35I 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…
Re: I cheated on my Microsoft interview (2019)
#36Re: I cheated on my Microsoft interview (2019)
#37He 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.
This guy is one of those LinkedIn thought leader types prone to oversharing for attention.
> I've struggled with this a lot over the years, but I finally decided to share my story. I don’t think I would have made it past the first round of interviews at Microsoft if I hadn’t gotten so lucky. So pretty much, my entire career is built on one amazing stroke of luck.
...which explains why they felt like they "cheated".
Re: I cheated on my Microsoft interview (2019)
#38Earlier 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)
#39He 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.
Re: I cheated on my Microsoft interview (2019)
#40Unless 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.
I do believe it is only one.