Hacker News new | ask | show | jobs
by mabbo 2875 days ago
There's a specific best solution involving dynamic programming. If you've heard the answer, like say if you spent a month reading a bunch of common programming interview questions, then you can 'solve' it in 15 minutes. If you haven't, then you need to be ready to invent the same solution in 45 minutes (less the 5 minutes spent explaining the problem).

Maybe Google (and the other big tech companies using the same style of interview) is looking for the types who can brilliantly solve problems like that in 40 minutes, but they're instead going to hire a lot of guys who read the book of problems ahead of time.

2 comments

They don’t read books, they solve leetcode problems.

A friend was obsessed with getting into FAANG and relentlessly drilled leetcode problems. There’s a whole community around it, basically memorizing enough toy problems that they can pass these interviews.

The companies should know by now that these clever problems aren’t really that clever. I have not interviewed in a long time but I think I’d get kind of depressed if an interviewer asked me 2sum. I’d just lose respect for the company.

I've solved this very problem without reading the answer. If you understand dynamic programming, this is simply testing your skills in it (although I'd agree it may be too much for a short session).
Sure, but usually the problem is decorated in a few layers of bullshit to hide what the true problem is. I remember the core, actual problem, but that wasn't what got presented. So take off another 5 to 10 minutes cutting through that.