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

5

u/skeeto Sep 23 '20

I completely agree. Every time these big interview threads come up, the overwhelming consensus is that these intermediate-level programming problems are somehow irrelevant, or that they require some sort of special study. What are you people doing that algorithmic issues never come up? I bet they do, and that they're usually just solved poorly, which would explain a lot. I have two simultaneous reactions to these threads:

  • I'm disheartened that the industry is in such a state that this kind of challenge is considered difficult. Is this why software quality has plummeted? I would never hire anyone who couldn't at minimum reach the recursive solution quickly on their own. When prompted to make their solution efficient for a larger number of hops, I'd seriously hesitate to hire anyone who couldn't work out a solution that completed in a reasonable time, whether it's dynamic programming, memoization, or something else.

  • It boosts my personal confidence since, if this is my competition, I will never have trouble job hunting. More than that, r/programming naturally selects for programming enthusiasts — who else would participate in a discussion forum? — so the people here are generally above average, and even these above average people struggle with intermediate-level problems.

4

u/FUZxxl Sep 23 '20 edited Sep 23 '20

One thing that's easy to miss is that the reddit audience is largely comprised of students and junior programmers who might not have a solid understanding of algorithms engineering. While there are some capable people in here, they are pretty much a minority. But I concur in that the algorithms skills of the current generation of programmers seem to be severely lacking. I just finished my CS degree and noticed this a lot. It's possible to finish a CS programme with more or less just applied subjects that don't require solid programming and algorithms skills. And given how much problems people have with the math prerequisites (linear algebra, calculus), it's little surprise that they don't know how to apply them effectively or to even recognise a linear algebra problem when it occurs.

intermediate-level

And that too. This interview problem is pretty easy. It requires no fancy algorithmic techniques and no knowledge of some obscure method. It's not even hard to program a solution, even if you have no way how to start. I would give this as homework to second-year students (and as a matter of fact, I will!).

2

u/alkanshel Sep 24 '20

To be fair, it's probably pretty stressful to crunch through in 45 minutes, though. Or really, 30 minutes after introductions and leaving room for questions at the end.