Live data from Hacker News

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

news.ycombinator.com

1–10 of 206 posts

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

#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 problems and solutions, and a lot comes from knowing the algorithmic primitives from which modern algorithms are born.

For many, whiteboard questions are "fun"- in the same way my parents like to do crossword puzzles for the intellectual exercise, Googlers like to discuss challenging, abstract-but-related-to-ads-or-search questions.

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

#3
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…

> algorithmic primitives from which modern algorithms are born.

What is a good way to learn more about these?

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

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

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

#5
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…

> algorithmic primitives from which modern algorithms are born. What is a good way to learn more about these?

The only reason it seems to even learn them is to pass an interview...

What a utterly stupid and broken process. All it's testing is recall, that you've memorized some algorithms that 99% of developers will never need. Especially when these are really hard problems that people have studied for years, to think that anyone who hasn't memorised the solution is working this stuff out in an hour on a whiteboard is craziness.

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

#6
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 think that was meant to be a hyperbole.

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

#7
post #5

Earlier quoted context omitted.

> algorithmic primitives from which modern algorithms are born. What is a good way to learn more about these?

The only reason it seems to even learn them is to pass an interview... What a utterly stupid and broken process. All it's testing is recall, that you've memorized some algorithms that 99% of developers will never need. Especially when these are really hard problems that people have studied for years, to think that anyone who hasn't memorised the solution is working this stuff out in an hour on a whiteboard is crazine…

I'd learn it just for the knowledge, I have no desire to go into the interviewing process again. I agree that interviewing is a broken process.

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

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

So now you have to know or invent a list of euristics that tend to go fetch the results first.

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

#9
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…

> algorithmic primitives from which modern algorithms are born. What is a good way to learn more about these?

This book https://www.amazon.com/Data-Structures-Algorithm-Analysis-C-... Don't let the "in C++" scare you If you google about you'll find free copies of older editions online

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

#10
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…

> algorithmic primitives from which modern algorithms are born. What is a good way to learn more about these?

I find my problem mapping methodology often leads me to remember these three books:

Aho and Ullmann: Foundations of Computer Science (old but really, really, really good)

Steven Skiena: Algorithm Design Manual

Abelson: Structure and Interpretation of Computer Programs

Post reply on HN