Live data from Hacker News

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

news.ycombinator.com

41–50 of 206 posts

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

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

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

#42
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're having fun solving them.

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

#43
post #32

Earlier quoted context omitted.

Indeed, although it's not unheard of for mathematics lecturers at university to throw in a question within a twenty-question problem sheet for their course that is actually equivalent to some important unsolved problem, on the off chance that one of their students sees things in a totally new way and makes a ground-breaking discovery. Solving something NP-hard in linearithmic time would certainly qualify...

Do you have a cite/example of a lecturer doing that on an exam? Are there any examples where that has been successful? I had never heard of that happening! It would be extremely cool if it ever worked.

[deleted]

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

#44
post #4
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 an NP-hard problem you haven't heard of, write correct code for nlogn solution on whiteboard in language of choice I guess that would be a trick-question then, as nobody ever solved an NP-hard problem in linearithmic time.

I should have said "n log n heuristic approximate solution" (my defense: I'm actually a biologist pretending to be a computer scientist).

Many problem solutions at Google are effectively heuristic approximate solutions to NP-hard problems (or less hard but interesting problems).

There's no trick, they just want to know you can figure out how to compute things quickly so they can run online in a server or a batch job. And the things that need to be computed are often problems with high time or space complexity and the exact answer doesn't need to be known.

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

#45

Earlier quoted context omitted.

I think that was meant to be a hyperbole.

Indeed, although it's not unheard of for mathematics lecturers at university to throw in a question within a twenty-question problem sheet for their course that is actually equivalent to some important unsolved problem, on the off chance that one of their students sees things in a totally new way and makes a ground-breaking discovery. Solving something NP-hard in linearithmic time would certainly qualify...

My favorite was this question, quoted verbatim from a test in my biophysics grad program:

What is the time resolved flourescence of a fluorophore in 4 dimensions?

The solution, explained to me by my friend who was a very smart physicist, was the first time I heard the word "tensor" (this was a long time ago, long before machine learning used that word) and I was obsessed with the idea that there was all this cool math you could use to solve hard problems.

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

#47
post #27

Earlier quoted context omitted.

>>Sure you can write a for loop to iterate over a data set, but will you fall on your face when that data set is petabytes in size? I understand what you are trying to say here. But how many candidates are capable of inventing path breaking algorithms in 45 minutes, just to crack a job interview? I guess only a countable people in the world could achieve a feat that amazing, where they could invent a totally new nove…

> There is nothing novel in merely knowing an algorithm. And you also have not tested a person's ability in inventing an algorithm either. The goal of this is too test whether the interviewee can recognize that this is a case to apply this algorithm in. It pattern recognition, not memorization, that is being tested here. Whether that is particularly useful is of course the million dollar question.

>>The goal of this is too test whether the interviewee can recognize that this is a case to apply this algorithm in.

That's the easy part. Everyone knows if you have sort a large data set, then you partition it in someway. Searching a huge data set requires building a tree on some criteria before hand and eliminating whole branches at every node. Or that they have to use a graph algorithm to figure out shortest paths and cost associated with the paths. Or that if you face a situation where you recompute many results you memoize. Or that writing nested for loops is a very bad idea. These are easy things to spot.

But they won't clear you in the interview if you don't get the mechanics right. Knowing BST helps in sorting doesn't cut it. They want you tell them how you would traverse across a tree in some 'level ordered' fashion. Or list different ways you could order a graph and list the exact heuristic. From here on this is pure memorization.

There is huge difference between inventing a new framework of thought even at an abstract level, and knowing the precise mechanics of balancing a tree.

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

#48
post #32

Earlier quoted context omitted.

Indeed, although it's not unheard of for mathematics lecturers at university to throw in a question within a twenty-question problem sheet for their course that is actually equivalent to some important unsolved problem, on the off chance that one of their students sees things in a totally new way and makes a ground-breaking discovery. Solving something NP-hard in linearithmic time would certainly qualify...

Do you have a cite/example of a lecturer doing that on an exam? Are there any examples where that has been successful? I had never heard of that happening! It would be extremely cool if it ever worked.

Supposedly this person proposed the correct structure for diborane in his homework.

https://en.wikipedia.org/wiki/H._Christopher_Longuet-Higgins

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

#49
post #39
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 after choosing a technology (like Hadoop), there's a lot of difference between the best and the worst algorithm to solve a problem. For example, the reduce phase of MapReduce is pretty much "apply the algorithm you want on this List", and that's where knowing good list algorithms (for example) shine.

Sorry, in almost all cases its really choosing over several ways of Joining the data, not writing SELECT *, not writing cross joins and learning SQL well.

Which why I ask again. Please list your problem which is so novel it requires you to invent a novel algorithm.

Please note statistics is a science that has existed for centuries now. Unless you are in a university, its highly unlikely you have a problem that will need to you to work on something that novel.

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

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

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 structures and algorithms concerns pop up quite fast.

[1] https://lintool.github.io/bigdata-2018w/slides/didp-part02b....

[2] https://lintool.github.io/bigdata-2018w/slides/didp-part09b....

Post reply on HN