Live data from Hacker News

I cheated on my Microsoft interview (2019)

facet.net

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)

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

I'm shocked too.

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)

#34
Holy crap, I wouldn't have thought twice about being lucky enough to roll out a solution I'd happened to have been thinking about for days. I am not seeing an ethics problem here, the guy was just very lucky to get a problem he was intimately familiar with.

Re: I cheated on my Microsoft interview (2019)

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

Using 64 bit integers, we can store the square of any 32 bit integer. Not that small...

Re: I cheated on my Microsoft interview (2019)

#36
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.

Re: I cheated on my Microsoft interview (2019)

#37

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.

This guy is one of those LinkedIn thought leader types prone to oversharing for attention.

That's harsh because TFA does mention that they feel outright uncomfortable (even after 18 years!) how big a role luck played in them clearing that fizzbuzz interview question:

> 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)

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

No post body was provided.

Re: I cheated on my Microsoft interview (2019)

#39

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.

Re: I cheated on my Microsoft interview (2019)

#40

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.

> when given an array of length n + 1 containing integers 1 through n, find the duplicate integer in an array.

I do believe it is only one.

Post reply on HN