r/programming • • Sep 22 '20

Google engineer breaks down the problems he uses when doing technical interviews. Lots of advice on algorithms and programming.

https://alexgolec.dev/google-interview-questions-deconstructed-the-knights-dialer/
6.4k Upvotes

1.1k comments sorted by

View all comments

Show parent comments

9

u/SJC_hacker Sep 22 '20

They do have the time. I spent a total of about 9 hours interviewing with Google, split over 8 separate interviews, including six coding coding interviews. This was divided up into initial screening of two separate coding questions, then final interview consisted of four separate coding questions (it should have been three, but they screwed up and gave me an extra one).

So the question is do we give one problem to solve over five hours, or five different problems to solve in hour each.

The problem with all the little problems - one the questions that I didn't get right, was straight out of a 'Hard' Leetcode problem I hadn't practiced yet.

I just interviewed with another SV company. Coding interview was three problems of increasing difficulty. The second question was LeetCode problem, that I *had* encountered, and was able to solve. I only got halfway through the third problem. But apparently this was enough to get to interview with hiring manager.

So the gridning LeetCode does seem to help.

I do actually find some of the LeetCode problems interesting, and they do come up in actual use cases, from time to time . For example, implement an LRU cache in an optimal way. Caching is a pretty common problem in that comes up in a actual systems, from CPUs pages to databases.

Other LeetCode problems are just annoying and really esoteric.

4

u/SanityInAnarchy Sep 23 '20

Another advantage is, you get enough interviews with enough different people that it's less likely one bad interview (or bad interviewer) will sink you (or let in someone who sucks). And they have time, but in aggregate -- no one interviewer had to spend an entire day on you, the way they did at that startup.

The idea that you need to study for such an interview is... suboptimal, but I don't think it's an indication that the interviews can't work. Turned out you could solve those problems, given the right preparation.

1

u/hardolaf Sep 23 '20

Except in most of the tech industry, ever interviewer has veto power over the candidate.

1

u/Kered13 Sep 23 '20

Definitely not true at Google. I have given No Hire recommendations to candidates that got hired.

2

u/Kered13 Sep 23 '20

If you were given an interview question at Google that can be found on LeetCode, then that question should be banned. All algorithm, coding, and design questions at Google are meant to be seen for the first time. It is an unfair advantage to the candidate if they have seen the question before.

Of course, in the real world this does happen for a few reasons. Interview questions get leaked by candidates frequently. When they get posted to sites like LeetCode they don't get noticed immediately, and when questions get banned the interviewers using them often don't find out for months.

There's also a cruel irony that the best questions get used the most, leaked quickly, and then banned. And coming up with good questions of this type is hard.

1

u/SJC_hacker Sep 24 '20

The question I got at Google had been on LeetCode for four years. But it was not tagged as Google question.

I think Google may have given up banning questions because they are on LeetCode/HackerRank/etc., as it is simply impossible to come up with enough new, and fair, questions to adequately test candidates.

2

u/Kered13 Sep 24 '20

No, they still ban questions. Your interviewer was probably either just not aware of the ban, or was pretending he was not aware because he didn't want to find a new interview question.

Actually another way I've seen banned questions slip in is because a question gets reposted with a difference phrasing (often a different setting) without realizing that a nearly identical question is already banned. The new question will still be banned when the similarity is pointed out, but again this can take awhile.