Live data from Hacker News

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

news.ycombinator.com

181–190 of 206 posts

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

#181
post #133

Earlier quoted context omitted.

> I had to train extensively (reading CLR, practicing) I didn't know what "CLR" was, so I searched around: Cormen, Leiserson, Rivest's "Introduction to Algorithms" [1]. [1] https://en.wikipedia.org/wiki/Introduction_to_Algorithms

Yes, it's usually abbreviated as CLRS.

Apparently they added an author since I last studied. Damn, that was over 10 years ago.

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

#182
post #173
post #64

Earlier quoted context omitted.

But I suppose appropriate heuristic solutions are typically only "pondered about" and not "found" at the whiteboard, because they require extensive testing with real-world data to see if they are actually efficient in practice.

No, that's not necessarily how it works. Often (most?) of the time, heuristic solutions are also found by Complexity Theorists, and they usually can prove that their solution is efficient for problems with certain characteristics, e.g. random data, not random data in a particular way, etc. These are then applied by the industry when they come across problems with these characteristics.

[deleted]

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

#183
post #181
post #133

Earlier quoted context omitted.

Yes, it's usually abbreviated as CLRS.

Apparently they added an author since I last studied. Damn, that was over 10 years ago.

Yeah, quite a bit must have changed or more likely evolved through the years, so a lot of the pseudocode and algorithms have been modified or added for instance, topics on dynamic programming, memoization and the like have had more emphasis. Several revisions to examples in basic tree algorithms and additions of some too have arisen. You could consider brushing up on a few things as a casual read perhaps, especially on the new topics. Also, another book I found great was Skiena's Algorithm Design manual.

[1] https://www.quora.com/What-is-the-difference-between-CLRS-se...

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

#184
post #173
post #64

Earlier quoted context omitted.

But I suppose appropriate heuristic solutions are typically only "pondered about" and not "found" at the whiteboard, because they require extensive testing with real-world data to see if they are actually efficient in practice.

No, that's not necessarily how it works. Often (most?) of the time, heuristic solutions are also found by Complexity Theorists, and they usually can prove that their solution is efficient for problems with certain characteristics, e.g. random data, not random data in a particular way, etc. These are then applied by the industry when they come across problems with these characteristics.

Yes, that's simplifying the problem by making assumptions about the data. Except you often don't know what assumptions you can make. Better to check the assumptions using the data before devising an algorithm for the given type of data.

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

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

Not quite the same, but David Huffman was given a choice between writing a term paper on finding the optimal binary code and a final exam. Just before he was about to give up on the term paper, he solved the term paper problem by inventing Huffman Coding[1].

[1] http://www.huffmancoding.com/my-uncle/scientific-american

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

#186
post #66

I came across a guy on Reddit a while back who was currently employed at Facebook. He thought he'd try making a video of him doing one of Facebook's interview questions thinking it'd be easy for him to do. He stumbled through the problem and didn't end up solving it in the timeframe that would have been allowed. It was good of him to still post it but it showed that someone currently employed at Facebook would have b…

I remember that video. I thought it was hilarious because the question was so easy anybody that has done leetcode would be able to identify it and code it in like 5 minutes. I've gotten it at 4 different companies!

would love to watch this, can you share the link?

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

#187

I have no info about whether Google/Facebook programmers can solve whiteboard questions easily so I expect this comment to be down voted but ... I'm consistently surprised by the fact that, despite hiring programmers who are the world's most elite, Google's products and services are just kind of ... plain/average/boring. The products and services are far less amazing than Google's engineers. It's like Google takes in…

It looks like they enjoy creating it instead of making it popular for the end users. Google+ is a good example.

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

#188
post #94

Earlier quoted context omitted.

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 the…

For someone who is preparing for interviews, this is really good advice. Thank you.

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

#189
post #173

Earlier quoted context omitted.

No, that's not necessarily how it works. Often (most?) of the time, heuristic solutions are also found by Complexity Theorists, and they usually can prove that their solution is efficient for problems with certain characteristics, e.g. random data, not random data in a particular way, etc. These are then applied by the industry when they come across problems with these characteristics.

Yes, that's simplifying the problem by making assumptions about the data. Except you often don't know what assumptions you can make. Better to check the assumptions using the data before devising an algorithm for the given type of data.

I agree in principle. But imo in reality, what actually happens is:

1. Most data sets are roughly similar (or at least fall into one of a few cases).

2. Most algorithms are designed beforehand, on ideas of what data could be, not necessarily for actual data.

Take for example sort algs. Sure, you could look at your data and devise a sort that exactly matches it most effectively. But in reality, in most cases, people just use quick sort, which is proven to be efficient on most data sets.

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

#190
post #71

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…

We don't hate whiteboard problems because they aren't fun. They're obviously fun for some people. We hate them for interviews because they're a terrible signal for hiring, they're often poorly administered, they're humiliating, they discriminate against introverts, and they've become frustratingly common. They unfairly mess with people's livelihoods. It is a really big, life-altering issue for some people.

And yet, nobody has a significantly better tool.
Post reply on HN