Earlier quoted context omitted.
This isn't a brain teaser, they actually correlate with on-the-job performance. When I worked at Google I looked up their internal reports on the subject and they showed that the score people got on these algorithm interviews correlated pretty well with their performance ratings after they got hired. In other words the group of people who got hired even though they had low scores performed significantly worse than th…
Maybe for Google-type/scale problems, but I'd say that the engineers I've worked with and hired for "normal" software jobs (e.g. here's a boring business domain, make it CRUD, make an API, make a UI for it) - there is almost an inverse correlation between being a CS/algorithm genius and being happy/successful at these everyday roles. From observation, many super sharp CS people very frequently want to write systems f…
Google Interview Questions Deconstructed: The Knight’s Dialer
61–70 of 134 posts
Re: Google Interview Questions Deconstructed: The Knight’s Dialer
#62Earlier quoted context omitted.
This reads like satire. There is no chess knowledge involved. The constraint is that you can only dial in a 2x3 L-shape. Edit: Typo, as opposed to the well known capital L-shape that is just one unit wide.
Seems like you already fucked it up, smart guy.
They were probably just trying to say that a knight's move looks like a straight line of 3 cells in one direction (which includes the starting position of that piece) and then 1 more cell in a perpendicular direction.
Re: Google Interview Questions Deconstructed: The Knight’s Dialer
#63Re: Google Interview Questions Deconstructed: The Knight’s Dialer
#64Counting the number of paths when you have loops is easiest using a connection matrix and matrix exponentiation. Then you get log(n) time.
[1] https://en.wikipedia.org/wiki/Diagonalizable_matrix#Applicat...
Re: Google Interview Questions Deconstructed: The Knight’s Dialer
#65Typical brain-teaser interview question that will have absolutely no correlation to on-the-job performance but makes the interviewer feel really smart. I thought Google had gotten away from these.
This isn't a brain teaser, they actually correlate with on-the-job performance. When I worked at Google I looked up their internal reports on the subject and they showed that the score people got on these algorithm interviews correlated pretty well with their performance ratings after they got hired. In other words the group of people who got hired even though they had low scores performed significantly worse than th…
Re: Google Interview Questions Deconstructed: The Knight’s Dialer
#66Earlier quoted context omitted.
I doesn't take long to understand how a knight moves, though. Move two squares in a direction and then move one square perpendicular to that.
Sorry, what is a square? I come from a society that exclusively uses a polar coordinate system and have no such concept of your cartesian-biased constructs. (/s)
Those of you who are trying to turn the flaw of this question into a joke are perfectly demonstrating two things: hiring practices in our industry are a joke to many of the people conducting interviews, and your thinking is so weak that you are unable to unambiguously explain this question without resorting to the chess analogy.
Re: Google Interview Questions Deconstructed: The Knight’s Dialer
#67Earlier quoted context omitted.
> A person who has never seen chess will spend more of the interview just trying to figure out what is meant by the Knight's move. I mean he explicitly spells it out as part of the problem. I highly doubt in an interview they'll just plop down a term like "knight's move" and refuse to clarify what is meant by it, if necessary. It's not exactly the sort of thing that takes living a life of privilege to understand.
The difference is on the margin. If typical candidates who reach the optimal solution reach it in the last 5 minutes, and if it takes 5 minutes to discuss with a non-chess-playing candidate how a knight moves, then you have severely disadvantaged that candidate.
I would be more inclined towards a candidate that knew nothing of a problem but was able to explore a way to the answer vs. a candidate that knew the answer simply because of hours of rehearsal
Re: Google Interview Questions Deconstructed: The Knight’s Dialer
#68This is a fun problem, but it's a terrible interview question for trying to hire software engineers.
* Can the person program at all. * Do they consider the performance of possible solutions. * Are they good at explaining their thought process. * Do they consider edge cases? * Do they write tests?
I'm not saying that it should be the only interview, or it is the most important. But it clearly provides differentiation between candidates. I'm also not saying it is the perfect way to get this differentiation, but I think it is far from "terrible".
Re: Google Interview Questions Deconstructed: The Knight’s Dialer
#69At the end he hints at a better solution. Now I'm intrigued.
Re: Google Interview Questions Deconstructed: The Knight’s Dialer
#70Counting the number of paths when you have loops is easiest using a connection matrix and matrix exponentiation. Then you get log(n) time.
I think this hits on why these types of problems are potentially bad. You could be the world's worst software engineer , but if you'd taken a graph theory course recently, you'd pattern match this, say "sure, can I use Matlab?" and be done in under 10 minutes. Or you could have tons of experience deploying robust production systems but have never happened to learn / need to use dynamic programming, in which case comi…
I'm also not worried if they make a good solution, or even get a solution at all. But almost all candidates can start making progress, come up with some possible solutions and tell me about those solutions.