Live data from Hacker News

I cheated on my Microsoft interview (2019)

facet.net

181–190 of 503 posts

Re: I cheated on my Microsoft interview (2019)

#181
post #134

One time a company I interviewed with asked me obscure algorithm questions about playing card shuffling. As a former professional magician I knew the optimal answers instantly and could jot them down straight away. They had allocated an hour for answers I wrote in a few minutes. I could have told them I had a massively unfair advantage, but I did not bother. They were visibly impressed and told me I was moving on to…

Can you elaborate on what made the question obscure? I'm asking because I used the question "print out the first 52 numbers in random order"in interviews before, and the answers seemed to give a good hint about understanding of basic CS concepts.

np.random.choice(52, 52, False) + 1

Re: I cheated on my Microsoft interview (2019)

#182

Earlier quoted context omitted.

This is what happened at my Oxford interviews. They asked me stuff that I knew the answer to, thinking it would be one of those see-how-he-thinks things. Biggest problem was acting like I didn't know and getting it really fast. Total lottery, they could have asked any number of things that I didn't understand.

Ya, this is hard. I bombed an Amazon interview because the interviewer asked me Alien Dictionary, a well known LeetCode problem that I already worked out while practicing. I told her outright that this was a problem everyone practiced, but she still dinged me for already knowing the answer and not going through the “figure this out flow” (admittedly, I could have handled that better, but it is actually difficult to w…

> it is actually difficult to work through something that you I am the answer to but forgot how you got the answer

Well, yeah. That's a big part of the point of the question. Anybody can Google the answer. Do you understand it well enough to explain it, and if you don't, can you walk through your thought process as you figure it out.

Re: I cheated on my Microsoft interview (2019)

#183
post #128

Ok, so how are interviews fair at all then? How do they really tell anything about the person, other than the fact they are good at interviews? How is it fair that all the other people queued up to interview didn’t get a shot because they didn’t do as well in a 5 minute high pressure period? This 5 minutes probably determined the courses of their lives. What the fuck? Does anyone feel as flabbergasted about interview…

This sentiment gets shared a lot, but what's a better alternative? Without ignoring the reality that you only have 15-20 minutes with each candidate, some of them will be brilliant, and at least a third or more won't be able to code their way out of a paper bag. Oh, and keep in mind false negatives have almost no downside but false positives hurt the recruiter financially, and hiring bad people is expensive.

> but what's a better alternative?

"Write a function that, when given an array of length n + 1 containing integers 1 through n, find the duplicate integer in an array.

You can use this equation: sum(1 to n) = n(n + 1) / 2"

Basically, if your solution is made trivial by someone knowing a generic formula or equation, just give it to them.

Not giving them the formula doesn't give you any additional information.

Re: I cheated on my Microsoft interview (2019)

#184

Ok, so how are interviews fair at all then? How do they really tell anything about the person, other than the fact they are good at interviews? How is it fair that all the other people queued up to interview didn’t get a shot because they didn’t do as well in a 5 minute high pressure period? This 5 minutes probably determined the courses of their lives. What the fuck? Does anyone feel as flabbergasted about interview…

> Does anyone feel as flabbergasted about interviews and tests? Yes. You're at worst the average, at best part of the majority. Almost everyone sucks at interviews and most job hiring processes are incredibly degrading. Feedback is terrible (includes no feedback). Hiring managers are all looking for different things, either subtly or wildly. Onus to get good at interviews is entirely on the individual, not on the com…

Devil's Advocate:

It's never been as easy to interview with multiple companies as it is now. It's a numbers game, and I would (and have) had interviews purely for practice, or our of curiosity about some companies tech stack. If you make it all about the numbers, suddenly you feel less bad about blowing an interview, or filtering bad ones out early in the process.

> not on the company to make the process less of a hellscape.

I mean, they do suffer in the long term. Companies after all, are the products of their hiring processes.

Re: I cheated on my Microsoft interview (2019)

#185

Earlier quoted context omitted.

Can you elaborate on what made the question obscure? I'm asking because I used the question "print out the first 52 numbers in random order"in interviews before, and the answers seemed to give a good hint about understanding of basic CS concepts.

np.random.choice(52, 52, False) + 1

I'd start with, "What do you mean by 'random'?"

Re: I cheated on my Microsoft interview (2019)

#186

The question is very unrealistic... how often do you know there is exactly one duplicate in a list? Much more common is there are zero or more duplicates. Here is what I came up with: - We need a way to record what has been already seen - A hash-map could work, but I think we can be more efficient - We know that all elements are less than the array length in size... - So we can allocate a single array of flags with t…

Always start a programming interview by asking questions. You know there is exactly one duplicate in the list because you wouldn’t start coding without thinking about what the problem left unspecified and getting the interviewer to clarify.

Re: I cheated on my Microsoft interview (2019)

#187

Earlier quoted context omitted.

Ya, this is hard. I bombed an Amazon interview because the interviewer asked me Alien Dictionary, a well known LeetCode problem that I already worked out while practicing. I told her outright that this was a problem everyone practiced, but she still dinged me for already knowing the answer and not going through the “figure this out flow” (admittedly, I could have handled that better, but it is actually difficult to w…

> it is actually difficult to work through something that you I am the answer to but forgot how you got the answer Well, yeah. That's a big part of the point of the question. Anybody can Google the answer. Do you understand it well enough to explain it, and if you don't, can you walk through your thought process as you figure it out.

I failed to practice answering questions that I already knew the answer to. I also think the interviewers style had something to do with putting me off balance (it became adversarial after I pointed out this was just alien dictionary, I probably would have had a better result pretending not to have seen the problem before). Or maybe that’s just how things are at Amazon?

My Google and Facebook interviews went much better in comparison. None of their questions were top ten LeetCode ones.

Re: I cheated on my Microsoft interview (2019)

#188
post #134

One time a company I interviewed with asked me obscure algorithm questions about playing card shuffling. As a former professional magician I knew the optimal answers instantly and could jot them down straight away. They had allocated an hour for answers I wrote in a few minutes. I could have told them I had a massively unfair advantage, but I did not bother. They were visibly impressed and told me I was moving on to…

On the flip side, we questioned a candidate the usual way with pertinent technical challenges and so on. Then when driving in a van to lunch (our habit was to do a social segment as well as technical) I asked some puzzle questions - add 6 feet to a rope around the world, stretch it out and how far off the ground would it be? and suchlike. He was charmed, we brainstormed some answers and had a fun lunch.

Years later, now a senior Engineer at our place, he admitted he had been going to give us a miss that day, until that conversation in the car.

Re: I cheated on my Microsoft interview (2019)

#189

I wouldn't consider it cheating. It was either a stroke of luck, or MS wasn't really doing an especially good job of reviewing their tech questions. A big part of programming (in my book) is finding the way that works; using whatever path is required. If you peek through a hole in the curtain to do so, then that's fine. Knowing about the curtain, and the hole in it, is part of engineering. I remember taking a photogr…

I have found there are people who enjoy getting into the weeds of problem solving (possibly a minority) and other people who work really well with the weed divers in applying their results. I am a person who has benefited from this symbiotic relationship in school and in my profession, from the helpful study partner to the helpful stackoverflow answer. All of them have enabled me to build things bigger than I would be capable of doing alone, and they have seen their efforts as a crucial building block. Figure out what you enjoy and find people/tools/forums who compliment you.

Re: I cheated on my Microsoft interview (2019)

#190
post #74
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…

It's a quiz problem, and it's supposed to have "trick" solutions. However, if he wants to play that game, he should provide proof of his solution, not fiddle with syntax or error checking. That's why discussion is more important, and how he can show that understands what he's doing and not just memorizing tricks. (... none of which matters for his future role anyway.) The formula "falls out" naturally if you're used…

In my view the trick in this question is to think about adding up numbers not how you add them up.Since this was a programming question you don't need to know the formula you can add up the numbers in a loop. It wouldn't even be much slower since you need a loop of size N anyway for the purpose of adding up numbers in the input.

Xor solution and adding solutions are the same solution it's just a matter of what binary function you use for calculating sum. You can use any commutative, associative binary function which has inverse. You can use addition, xor or even multiplication.

Post reply on HN