Live data from Hacker News

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

news.ycombinator.com

91–100 of 206 posts

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

#91

I am a SWE at Google, and yes, most Googlers are pretty good at solving whiteboard problems. It's not like we are born with those solutions in our heads, but we enjoy solving those questions especially with other people. It's a lot of fun to "explore" answers to these questions, and that's what I think interviews are all about. I know HN hates whiteboard problems, but just like anything, you get good with it if you'r…

How do I force myself to find them fun?

Maybe start with the easy, one gets the sense of accomplishment when solving a problem, building on from there.

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

#92

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…

> 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?

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

#93

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 don't see how companies that claim it's hard to find talent can be OK with a system that would reject more than a small portion ( Edit: fixed word sense ambiguity

I see it like getting into a top college. Would your average college student be able to get a 2300+ (1500+ ?) SAT score if they had to take it again? Probably not unless they re-studied and prepared for it - which I think is the same answer for FAANG engineers and whiteboarding questions. Also, good SAT scores don't always translate into good college students and the same could be said for good whiteboarding skills d…

That's why standardized testing is becoming more irrelevant in college admissions.

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

#94
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.

Start simple: find a list (with answers). Don't try to "solve" them, just read the questions and try within a minute or so to name a data structure or algorithm -- something you'd expect most undergraduate intro classes to cover -- that seems likely to be part of the solution. Check your work, keep track of which ones you got right/wrong, and move onto the next question.

Re-visit the ones you got wrong first. Try them again, repeat until you've gotten them all right (this might just be because you remember the solution from looking it up, that's fine, you'll have plenty of time to forget by the time we get back to it :).

Now, revisit the ones where you had the right data structure on the first go. HOW would that data structure help? Go a level deeper on actually trying to solve it.

I can't guarantee this will be fun, but it should be fast. A few minutes here on there on any given problem, going one level deeper each time you visit it.

Eventually you'll have the whole algorithm for one of the problems, likely using some common data structure like a hash map, tree, or heap.

Code it in a language with a good set of algorithmic primitives, use every tool the library gives you (don't worry about remembering how the data structures work on this pass). Hopefully with the whole algorithm in mind and all of the tools at your disposal, this is "just plumbing".

Rinse, repeat.

Somewhere in there, do the same with the complexity analysis (time and space!).

Next time, try it where you have to build the data structure by hand.

Then one day you'll see a problem not on your original list, and you'll immediately think "red-black tree with a hash table lookaside buffer, but I wouldn't want to have to build the RB tree by hand if they asked me to, so AVL tree because the complexity is the same and I can bang out the code like it's what I do every morning before breakfast".

Like I said, it might not be fun (at least at first), but it is a way to break up the practice into digestible chunks. Also it builds on the strategy that I've seen work best in interviews -- if you treat each step of iterative deepening of the solution as a point where you'd talk with the interviewer about what you're thinking and why, you give them a lot to go on about your thought process and a chance to course correct if you misunderstood the question or your heuristic for how to approach it simply came up wrong.

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

#95
post #41

Earlier quoted context omitted.

I got the same response from an old friend who has worked for Google for the better part of a decade. FWIW my understanding is that the Hiring Committee tends to discard feedback from interviewers like your latter type here.

I had such an a-hole interviewer the last (and hence final) interview I did at Google. His attitude was ... oh .. you have a PhD, let me show you how smart I am. Just like getting into YC isn't necessary to be a successful founder, getting into Google isn't necessary to be a successful engineer. There are tons of companies out there, and many pay better than Google.

Give feedback to your recruiter. Interviewers can be forced into more training or taken off rotations.

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

#96
post #28
post #18

Earlier quoted context omitted.

> The only reason it seems to even learn them is to pass an interview... While I agree that the process is broken, a solid understanding of algorithms and data structures is very important for developers at my company. And nobody knows all , or even most of the algos or data structures! But we do have large amounts of data and some pretty complex analytic problems, and a poor design can cost a lot of time and AWS $.…

Those look like software design skills. Also the type of systems you describes use something like Hadoop, and use things like Hive and Pig on top of it. Once you get the data out you use Python or R. And you generally use a standard library to work with. That really SQL + general programming. What new problems are you working on that require you to invent novel algorithmic techniques?

Does your standard library have persistent functional thread safe radix trees? Because mine didn't so we had to write it.

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

#97
post #28

Earlier quoted context omitted.

Those look like software design skills. Also the type of systems you describes use something like Hadoop, and use things like Hive and Pig on top of it. Once you get the data out you use Python or R. And you generally use a standard library to work with. That really SQL + general programming. What new problems are you working on that require you to invent novel algorithmic techniques?

Even with Hadoop, there's still algorithmic decisions that you have to make like whether to choose a stripes or pairs strategy when synchronization is needed[1], or choosing appropriate data structures for real time queries [2]. Sure something like Hive and Pig might work well enough for certain queries, but for some of the more complex queries where writing bare MapReduce or Spark is needed then these data structure…

MapReduce is filled with algorithms. The core system is basically a merge sort engine (the shuffler). In fact, if you ever wondered about the question "sort 2M integers in 1M RAM", well, that was Jeff asking people if they could understand that shuffle was out-of-core.

Another example is lexicographic range sharding, which uses reservoir sampling to compute optimal tablet key split points by doing a constant-space-and-time heuristic sampling over the keyspace.

I used to think MR was just brute force, but it has many levels of algorithms. Probably too many- at some point it because hard to analyze how the system worked because of the various kinds of hedging and recovery strategies.

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

#98
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'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.

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

#99
post #92

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…

> 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.

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

#100
post #2

I work for Google and have never been good at the "Here's an NP-hard problem you haven't heard of, write correct code for nlogn solution on whiteboard in language of choice" question. I had to train extensively (reading CLR, practicing) to be able to pass. However, large numbers of engineers at Google are very good at solving whiteboard questions. A lot of it comes from practice, a lot comes from knowing the common p…

Here's my real question: How often do you solve those kind of whiteboard problems in your daily work? Obviously, you'd never be forced to solve them in 45 minutes while being judged, but how often are you actually solving computer sciency kind of problems in general as opposed to solving more software engineering type of problems?
Post reply on HN