Live data from Hacker News

Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

news.ycombinator.com

101–110 of 206 posts

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#101
post #36

I work at Google and no it's not easy for us either. I've heard many of my coworkers joke that if they went through the interview process again they'd probably fail. That said I see two kinds of interviewers. One kind (the good kind) takes a medium difficulty question and uses it to explore the candidate's coding, algorithms, communication, and problem solving skills. The other kind has a super hard question with a s…

I also work at Google and what mystifies me when I do interviews is just how consistently people manage to screw up even the medium difficulty questions. I used to love asking this question until it was banned:

https://programmingpraxis.com/2012/01/20/knights-on-a-keypad...

This is a great question because it has several levels of solutions:

1. A recursive solution that iterates over all sequences, exponential time and logarithmic in space. Interviewing for T3 (entry level, think college grad), getting only this far in 45 minutes earns a "leaning no hire" in my book.

2. The above solution except with memoization, which reduces the runtime to linear but requires linear space. This one earns a "leaning hire" from me.

3. A dynamic programming solution that takes linear time and constant space. This one gets a "hire" to a "strong hire," depending on the elegance of the implementation and the strength of the discussion we have around it.

4. A logarithmic time solution involving adjacency matrices, matrix multiplication, and binary decomposition of numbers. I've never seen anyone get this and I only learned about it after months of asking this question.

It's shocking how few candidates actually got as far as solution 1. I kinda want to open this up to the HN comments section, because this does not strike me as a brutally difficult problem, but the rate at which people fell on their faces when presented with this question suggests either something about our interview process or about the candidates we interview.

EDIT: A clarification about “getting as far as” a particular solution: I’m not sitting there stone faced taking notes, I provide hints and prods and suggestions to push candidates toward more optimal solutions. I want the candidate to get as far as possible because it feels good to watch someone succeed, but oftentimes they run out of steam or take forever to implement their solution. In particular with respect to solution 1, if that’s as far as a candidate can get despite my recommendations, that’s not a good sign for their algorithmic ability.

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#102
post #98

Earlier quoted context omitted.

> I've heard many of my coworkers joke that if they went through the interview process again they'd probably fail. I’ve heard this joke at a lot of tech companies. Also, “the hardest thing I’ve ever done at my job was pass the interview.” Just shows how divorced from day-to-day work skills interviewing has become. I think most tech companies severely overestimate the cost of false positives, particularly in the USA w…

I'd be curious what the pipeline of candidates looks like at these top places. You're probably correct that they are being overly critical and rejecting plausible candidates. They may be overestimating their needs, but they are also probably inundated with overconfident chumps.

I bet if you could select only the people who made it to the in-person interviews at these companies, which usually happens after multiple weed-out filters, you’d have a way-above-average cohort.

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#103

Yes because they only hire the absolute best

Top 1% of intelligence

About 8 years ago, I got an interview at Google. I didn't really even want to work there... I just wanted to see what the place was like. So I made it through the phone screens, went to the interview, and I failed. It was still a good experience!

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#104

The question I recently got that I found annoying was this: Given input (4, 2, 3, -1, 5) and output (-30, -60, -40, 120, -24) what's the function between them? I don't actually mind doing whiteboard interviews even on minimal prep. I've gotten a few of the "flagship" company offers and failed a few. I think part of it is internalising that nothing is going to guarantee you anything. You can always hit a question you…

what is the answer y = -120/x ?

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#105
post #31
post #14

Earlier quoted context omitted.

"these are really hard problems that people have studied for years" Because of this. So that when you encounter a problem, you know how it can be solved efficiently. If you disregard existing knowledge, you are likely to spend a lot of time cooking up something complex and half-assed that creates an unnecessary maintenance load. Like music is composed of fundamentals, similarly most problems in computing can be decom…

>>If you disregard existing knowledge, you are likely to spend a lot of time cooking up something complex and half-assed that creates an unnecessary maintenance load. Unless you are stuck on an Island coding during a vacation, not one person on earth faces this kind of a situation. Almost anybody doing anything apart from basic beginner level coding work knows to look up to a solution on the internet if a solution is…

"Almost anybody doing anything apart from basic beginner level coding work knows to look up to a solution on the internet if a solution is not scaling already"

This applies to some practical areas, but some are murky and need more than agile google-fu to waid through of an algorithmic jungle to a solution that provides added value to end user.

There is a discipline and domain dependent threshold where the internet suddenly becomes obscure and unhelpful when one is trying to find solutions. In these instances either you are solving the wrong problem, or the problem is quite complex and/or does not have a closed form/ready solution. The best thing to happen in these instances is that one can limit ones input domain just so that it maps to some algorithmic concept or another. It's not rocket science, but in these instances having an intuitive feel toward the big O behaviour and various algorithmic constructs is really, really helpfull.

Sometimes you just need to implement your own fudged QR decomposition and understand a little bit of numerics, or build custom octrees and whatnot. Couldn't really do it without my books. I do CAD and computational geometry stuff, YMMV.

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#106

The question I recently got that I found annoying was this: Given input (4, 2, 3, -1, 5) and output (-30, -60, -40, 120, -24) what's the function between them? I don't actually mind doing whiteboard interviews even on minimal prep. I've gotten a few of the "flagship" company offers and failed a few. I think part of it is internalising that nothing is going to guarantee you anything. You can always hit a question you…

I also got annoyed with "closest pair of points" problem [1]. It needs some geometry observations to prove how time complexity can be achieved. I was just thinking "Are they testing me geometry?"

I don't know how questions are created and filtered for interviews.

[1] https://en.wikipedia.org/wiki/Closest_pair_of_points_problem

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#107

Earlier quoted context omitted.

Top 1% of intelligence

About 8 years ago, I got an interview at Google. I didn't really even want to work there... I just wanted to see what the place was like. So I made it through the phone screens, went to the interview, and I failed. It was still a good experience!

Same, except about 1 year ago instead.

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#108
post #92

Earlier quoted context omitted.

> A 5% bomb rate for an on-site question will put you into the 60-70% pass rate. I'm not sure I follow the math here, can you expand a little?

I just punched .95^10 (.59) and .95^6 (.73) into Google. I mean they're made up numbers, the point I was trying to get at was that you can do fairly well on these things but you just need to fail one question to fail in total. But if you do even two interviews your chance at getting one offer jumps to 1-.4^2 thru 1-.3^2 (84-91%). (Am I out of practice? Did I do that wrong?) -- I tapped out painful on my phone.

I suppose the math checks out, but I disagree with the model: the whole point of doing multiple interviews is to get a variety of opinions based on the knowledge that bombing an interview just happens. You're assuming that bombing one disqualifies you, but that's not true.

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#109
post #15

What do you mean by "whiteboard questions"? The ones I had at my FB interviews are questions I would describe as "any competent engineer should be able to solve most of these in an interview slot" sort of questions — Simple data structures (sometimes explicit, sometimes implicit as part of the problem statement), simple strategies (breadth first, depth first), and a basic understanding of time (and space!) complexity…

That’s because the FB process explicitly optimizes for speed. I recently finished a loop where I solved 2 problems optimally in 2 interviews and 1 in the last one and I was rejected. The speed required makes me skeptical many people can solve these problems in the required time without luck of having seen similar problems before.

Did they tell you this? I feel like a lot of candidates think they nailed it when really they missed important things. I'm not sure I've ever had a candidate solve my question fully and optimally. This of course is nowhere near necessary to get a good score but I think that thinking "yep this is as good as it gets" is a common error.

The hire rate is also super low at the majors so it could have also been noise.

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#110
post #75

I worked for FB. I like the whiteboard problems and many other engineers like them too, and I enjoyed discussing or solving similar problems over lunch. That's probably why they're so prevalent in interviews -- I don't believe they actually predict a candidate's success in a company. Btw in college, I used to compete on websites like topcoder, spoj, etc for fun. The interview processes of many companies drastically f…

How do I force myself to find doing those problems to be fun? To me they just seem painful because they really expose how stupid I am even if I know he basics.

It might be more fun if the problems are a bit more game like. I got my start with Euler Project which I was doing for fun looooong before I even thought about interviews. There's lots of other resources out like that now I think. I've heard people mention hacker rank.
Post reply on HN