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

2

u/[deleted] Sep 24 '20

I really like the problem. Many brain teaser problems require the candidate to make one big leap that may or may not come to mind, so they come down to luck, which is a terrible way to judge skills. This knight problem can be attacked systematically, and the solution can be improved upon in many ways. That works much better in an interview situation.

1

u/Fabalabulous Sep 24 '20

I solved the problem by reducing it to a graph. Arrived at a pseudo solution in about 10 mins, although mine was linear. I figured there was probably a constant time solution but I thought that was probably over-engineering a solution. So I guess I learnt that in interviews there's no such thing as an over-engineered solution :P