Live data from Hacker News

I had to give a wrong answer to get the job (2017)

dewitters.com

231–240 of 409 posts

Re: I had to give a wrong answer to get the job (2017)

#231

Them: Please randomize a list in O(n) time. Me: so you just want me to generate O(n lg n) bits of entropy in O(n) time? That's not possible.

I think you can do this with a Fisher-Yates shuffle (https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle), right?

Re: I had to give a wrong answer to get the job (2017)

#232
post #204

Earlier quoted context omitted.

I feel like I've replied to this same thing about five times now, but, yes, I completely understand the latency concern with growing a dynamic array. At the time, we weren't talking about it. Their question was, "What is the complexity of this?" And I said, "It's constant time over a series of appends." We didn't get past that.

The guy worked at EA for 8 years.. He must know what he is talking about

[deleted]

Re: I had to give a wrong answer to get the job (2017)

#233

Earlier quoted context omitted.

Wow those sound like such badly designed questions. What country is this?

I don't know about that person, but a friend of mine from India was telling me about a driving test question there - [translated] "How far should you stay behind another car - A) 2 meters B) 2 seconds". Apparently the correct answer is 2 seconds. In my opinion, the question is weirdly ambiguous.

I guess two meters is sufficient when you drive a walking pace, but any faster than that two meters will be too little. You say that this was in India, and I'm guessing two meters is way too much in a traffic jam :-)

Re: I had to give a wrong answer to get the job (2017)

#234
post #26
post #15

Can't really comment on whether that was the correct way to handle the situation, given that passing the interview was the goal. However, I would have a hard time giving an incorrect answer on purpose. I also consider an interview as an opportunity to learn about the company I'm going to work for, and especially my future colleagues. I would probably try to give a full answer, such as "there's a widely-held concept X…

Do you want to have that discussion with your team-lead almost fully cold, in front of his superior? Because in the article, that is the key point. The applicant was totally willing to go into a fair discussion about the pattern. However, doing that in front of the tech-lead his boss is likely to be different from a fair discussion. Disagreement about technical architecture is fine. Doing so in front of higher manage…

If you're already deciding you need to BS to keep the managers sweet in the interview, that seems like a pretty toxic work environment.

Re: I had to give a wrong answer to get the job (2017)

#235

Earlier quoted context omitted.

They are representing n to mean 2 different things. In this case, n is meant to represent a value passed in to the algorithm. The problem is that complexity is usually expressed relative to size of the input, which in case of this algorithm is log(n) = m bits. This makes the exponentiation version actually linear in terms of bits needed to represent the input. It's like saying that an algorithm that accepts n x n mat…

What two things do they use it to mean? There's literally only one thing it refers to in the original comment: The n th Fibonacci number. Show me the second. All additional uses of n in that comment are references to that same thing, the n th Fibonacci number.

In our case n = value of the input, log(n) = size of the input. Complexity is expressed relative to the size of the input. Size of the input is also usually expressed as n, which is shadowed by "value of the input" in the problem statement, so "sublinear with respect to n" has different meaning than "sublinear with respect to size of the input", & saying "sublinear" when talking about complexity implicitly translates into "sublinear with respect to the size of the input", which is incorrect without any additional statements - exponentiation algorithm is "linear with respect to the size of the input".

Re: I had to give a wrong answer to get the job (2017)

#236
post #196

Earlier quoted context omitted.

I'm fairly certain they were looking for a linked list, but I could be wrong.

> fairly certain they were looking for a linked list, but I could be wrong They were probably looking for an answer which went along the lines of a linked list and then what to fix - the ratio of pointer sizes to data (16-item nodes), sorted insert optimizations, the ability to traverse to the 500th element faster etc (skips with pow-10 or a regular skip list etc). I bombed a similar soft-ball interview question in t…

> it was a bad idea to use an ACID backend for a queue

Why do you think so? It completely depends on the utilization of their ACID backend, and how well it handles independent data.

Re: I had to give a wrong answer to get the job (2017)

#237
To be honest, one of the best predictors I have for job performance is learning something new in a job interview. Sometimes I get the feeling there are far to few people like this in the industry, but if I want to hire great colleagues, that just works the best.

Then again, I'd never ask a vanilla architecture question like the company in OP's post, as I've found that the best predictors for job performance are also the very questions that are the hardest to grade. Deep, open questions on a vast field — where there isn't anything close to a correct answer but rather thousands.

I still often go with the good old "what happens when you enter xyz.com in your browser and hit enter?", just because I can take it anywhere I want.

One day, I hit my bonus question "so what happens after hitting enter and before the first request leaving your computer?"

And the guy was like "well, the microswitch pulls the line of the keyboard matrix from high to low, generating a scancode that's then turned into a keycode in the controller..."

5 Minutes later we were all over his self-built keyboard and he had a job offer in hand 30 minutes later. I don't even wait for HR for the good ones.

Unfortunately he got an offer in hardware, and actually I was glad for him.

Re: I had to give a wrong answer to get the job (2017)

#238
post #86

If you have to lie in an interview to get a job, that's a pretty strong sign that the job is not worth having.

Or that it's just a single bad interviewer in an otherwise great organization, or a normally good interviewer having a bad day in a great organization, or any of an infinity of possibilities. Interviews are probably mostly useless to both sides. In the end, it's sink or swim.

My comment wasn't really based on any qualities of the interviewer or company at all. It's based on the perception of the applicant. If an applicant feels it necessary to be deceptive in an interview, that's a big sign that the job is a poor match for them.

It doesn't matter if the applicant's sense is justified or not. Either the applicant doesn't feel they are truly qualified for the job, and are being deceptive to avoid detection, or the applicant doesn't trust the company or people they're interviewing with. Either way, that means it's a poor fit.

After all, it's not exactly rare that a person is a poor fit in a company even if the company, and the applicant, are both excellent.

Re: I had to give a wrong answer to get the job (2017)

#239
post #8

> So I decided to start by giving the correct answer, and see how he responded. I explained “The model-view-controller is a software pattern, and so resides inside the written code. Since in most cases, this code only runs on the application tier, …”. But then I saw him frowning, and so knew this was not the answer the was expecting. So I continued: This is a great cold reading technique that works in magic tricks to…

All great until you come across someone with a permanent poker face. During my last interview, the interviewer was frowning the whole time.

I once got two raises in an interview because I was so (pleasantly) surprised by the size of the first offer that I wasn't sure what to say. There was a bit more to this situation - I liked the job I was in and the employer really needed someone, but it was still a revelation.

Keeping your mouth shut, saying no, and not lying or BSing are three of the most useful skills you can develop. Many people feel pressure to respond quickly, especially in a performance situation like an interview, just as the writer of this article was highly tuned to what his interviewer wanted to hear. Controlling the tempo and direction of your own responses is a way to gain the strategic initiative without being disagreeable.

Re: I had to give a wrong answer to get the job (2017)

#240

I bombed an interview at a game company because I gave a right answer that I couldn't get them to understand. I don't remember the exact problem they wanted me to solve, but the answer involved a dynamic collection and they wanted it to grow with constant time complexity. They were probably looking for a linked list. But I said I'd use a dynamic array because those have constant time when averaged over a series of ap…

You should have just said "Look guys, trust me, I am going to write Game Programming Patterns one day"
Post reply on HN