Live data from Hacker News

I cheated on my Microsoft interview (2019)

facet.net

271–280 of 503 posts

Re: I cheated on my Microsoft interview (2019)

#271
post #237
post #209

Earlier quoted context omitted.

It might be the difficulty of actually getting it right (if by "right" we mean that all 52! permutations are equally likely. Or perhaps it is more accurate to say the ease of not getting it right. Something like this: 10 pick a number from 1 to 52 20 if not already printed it 30 print it 40 if we have printed 52 numbers 50 halt 60 goto 10 works, but could take arbitrarily long time. Most people prefer bounded run tim…

I like to use problems like this too. What’s nice about this example is it provides lots of scope for discussion (as you did) without requiring much domain experience. If the person can’t program their way out of a paper bag you’ll find out right away. If they are a junior hire, any working answer is fine. If they have more experience they can start to talk about why they chose the approach they did. If they are quit…

If I was interviewing people what I'd probably do is pick 3 or 4 LeetCode problems, but not ask the person to actually solve them.

Instead, we'd pick whichever of the problems they find most interesting discuss the problem specification, and how we might approach it. We'd discuss what difficulties and special cases we anticipate. Then we'd look at the answer together and see if it seems to make sense. In these discussions I'd try to let them take the lead but would contribute enough to get things moving if they are getting hung up on something.

Finally, we'd go to the most valuable part of LeetCode, the discussion forum for the problem. In the discussion many people post their solutions and a lot of them are wrong. We'd look at a few of those and review them, again with me letting the candidate take the lead.

The great thing about the discussions is that the answers people post contain a wide variety of mistakes. Some don't solve the right problem. Some do get the right answer but don't meet the time or space constrains from the spec. Some miss edge cases. Some fall apart if the problem is too big (e.g., if an input array is big enough that every unsigned integer the language supports is a valid index).

Before we started I'd tell them we are going to do that, so when they hear the word "LeetCode" they don't have to worry even for a moment that I'm going to spring some hard trick question on them and expect to solve it under pressure. I'd probably even ask them if they have any LeetCode problems they have seen or did before and would like to use for this discussion. Since I'm not asking them to solve them, it doesn't matter if they've already seen them.

Re: I cheated on my Microsoft interview (2019)

#272
post #96
post #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; }

Try {2,2,1}

  /*
    I used to be able to do this without a compiler
  */
  for(;;){
    int i = values[0];
    if(i == values[i])return i;
    values[i] ^= values[0];
    values[0] ^= values[i];
    values[i] ^= values[0]; 
  }

  /*
    full test code, does java really not have Arrays.shuffle?
  */
  public static void main(String...args){
    final int result;

    Integer[] values = new Integer[12];
    for(int i = 1; i 

Re: I cheated on my Microsoft interview (2019)

#273
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,…

add 6 feet to a rope around the world, stretch it out and how far off the ground would it be

is this a technical puzzle/question? to me it reads like a middle school geometry question. it would be fun to discuss it with friends/colleagues but I wouldn't expect it during a software engineering interview

Re: I cheated on my Microsoft interview (2019)

#274
post #240
post #224

Earlier quoted context omitted.

I answered one of those mind benders nearly immediately in an interview. I figured out the trick as they were telling it basically. They asked me if I had heard it before. I hadn't. A final interview with the CEO and he asked if I had heard it before and I said I hadn't. I later realized based on how they were asking if I had heard it before, they thought I was lying. The question: You get on a ski lift going up. It'…

So... the answer is "impossible to know"? There's no data on how many seats there are, their distance, or whatever. There could theoretically be literally just the seat you're sitting on in the entire system. Then the answer is zero.

[deleted]

Re: I cheated on my Microsoft interview (2019)

#275

IMHO, this was not cheating. This is a phenomenon called success. If you are fortunate (?) to be around in the entrepreneurial world long enough, you will realize that intelligence, hard work, good time management etc are not adequate. They just qualify as deserving. There are serendipities that separate those who succeed from everybody else who was deserving. Survivor bias [1]. Calling Eli was your serendipity. The…

I once aced an interview after the recruiter handed me the list questions, all soft balls like "what is the difference between a promise and an observable". Naturally I googled every one of them and during the interview had to hold myself back as to not to totally dunk on the questions. Afterwards the recruiter called me back with the good news, I said it was almost unfair how easy it was, he just laugh and said that not everyone that gets the questions on a silver platter actually passes the interview.

Re: I cheated on my Microsoft interview (2019)

#276
post #84

Earlier quoted context omitted.

Out of pretty much all the people I know, I can't think of any successful career not pivoting on one such fateful moment of "luck". One lucky question/answer, one fortunate encounter, one near miss. Of course we'll never know how the road not taken looks like. Any moment could actually be a pivotal one but most are very unassuming and only the memorable ones stick with us, making them feel more important. Also, as so…

Not disagreeing with your points. > Preparing for this kind of question isn't cheating as long as you understood the answer. TFA notes that because of lack of interview prep material in 2004, even when the author knew the question before-hand, it took them days to arrive at an optimal answer. And then it dawned on them that everyone else at the job fair, who may be seeing a question for the first time, only had 15 mi…

I understand that I just don't consider it cheating despite their reaction during the interview. I'm not going by any formal definition of "cheating" here. But this person took the question as a practice question, not with the knowledge that it will be asked. They also did the work on proving and understanding it.

Let's put it another way. If you take an exam after practicing with any kind of practice questions (something that has been done since the dawn of time and the education system) and happen to run into the same questions in the real exam, was that cheating or better targeted learning? Or if you find out about a job from a friend who works there, is it cheating because you have a significant insider advantage over people who never knew about the job?

In my opinion true cheating would have been made up of a) someone feeding them the real questions and/or b) someone feeding them the answers. It involves an unwillingness to put in effort and a premeditation that I didn't see in the story. This person was indeed in a conflict of interest but I wouldn't call them "a cheater".

P.S. If I were in that interview I would have provided the full answer almost instantly, not needing any kind of hesitation to "simulate" the thinking process. I know the answer without any relation to the interview. So there could be 2 outcomes: a) I get unfairly excluded under the suspicion of cheating justifying the need to fake the thinking to avoid this or b) I would have passed to the next stage making that whole charade effectively inconsequential.

Re: I cheated on my Microsoft interview (2019)

#277
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,…

Is that a puzzle? Isn't it just 2πr + d = 2π(r + d/2π)?

Re: I cheated on my Microsoft interview (2019)

#278
post #243
post #224

Earlier quoted context omitted.

I answered one of those mind benders nearly immediately in an interview. I figured out the trick as they were telling it basically. They asked me if I had heard it before. I hadn't. A final interview with the CEO and he asked if I had heard it before and I said I hadn't. I later realized based on how they were asking if I had heard it before, they thought I was lying. The question: You get on a ski lift going up. It'…

Do you pass them all?

It could be sum of all the chairs -1, could be -2 if the chairs are two per row, could be that the hub where they turn around has a large radius and the spacing of the chairs is close enough of that you don't "pass" them, could be 0 if there aren't any other chairs.

I suspect the answer to this is "not enough information", which, I suppose, hints at an applicants requirements gathering thought process?

Post reply on HN