I'm working on open source stuff for two years now. Everything I do is public for everyone to see. Including my responses to bug reports and design documents.
Yet I get the same algo/ds puzzle questions that you should've solved before in order to solve it in an interview setup. Google reached to me and said based on my profile I can skip the phone interview but I'm so afraid of the interview that I postponed it multiple times.
I'm fine with algorithm questions only if I'm solving it in the same setup as my actual work where I have access to internet and can write some quick programs to test my ideas. I was good at solving pretty much any problem I had in my actual work. Even if I had to read a paper on the topic or learn about a new concept from ground up.
Google asks questions like pots of gold[1] where it's really impossible to solve it on a whiteboard if it's your first time seeing the problem.
I'm on hiring side of equation also. I get it, it's really hard to judge people. Even when the candidate have a GitHub page. I got a candidate from Hack Reactor where he had tons of contributions. But when I looked closely at those contributions they were mostly fake. Some other candidate had exactly same codebase in their GitHub.
* Google asks questions like pots of gold[1] where it's really impossible to solve it on a whiteboard if it's your first time seeing the problem. *
Ok, so here is an anecdotal sample. I have not seen this problem before.
After reading the problem description I tried one round of the game on the paper (actually in the text editor) to get the feeling of the game play and then it took me about few minutes to come up with one possible solution and then after a little bit of thinking with a more optimal one.
So not impossible (but I was in comfort of my home).
I actually think that this is a rather classical CS problem that does not require some thinking about more abstract mathematical corner cases.
I give an example of the later one.
You have an array or numbers [1 - n], that is not sorted. One of the numbers got changed to 0. Given an array after the change return the changed number in linear time.
Assume the some array but two of the numbers got changed to 0. Given an array after the change return the changed numbers in linear time.
Some information is actually missing/not obvious and interviewers may actually evaluate your reaction to this situation because this would also model (to some degree) a real life situation.
So I added the missing bits (and fixed typos).
You have an array size of n of integers from 1 to n, that is not sorted. There are no duplicate numbers in this array.
One of the numbers got changed to 0. Given the array after the change return the changed number in linear time and constant space.
Assume the same array but two of the numbers got changed to 0. Given an array after the change return the changed numbers in linear time and constant space.
The first part of this problem should be simple. The second part is more tricky.
FWIW I've had this same question in an interview years ago in Australia. Don't recall seeing the second part (which is more interesting, mathematically), but it just goes to show how many questions end up re-used by different companies as their employees travel.
These problems aren't that hard, although they do not say anything about the person that solves them. One can prepare for a Google interview in 1-3 months and I'm sure there's a pretty high chance they would pass it.
I've seen tens if not more people from my unknown middle EU university nail the interviews, ending up with jobs at Google, Facebook, Microsoft etc. and I've cooperated with some of them, knowing that their programming skills and knowledge, teamwork are lacking. But they can solve some simple dynamic programming problems, or maybe a silly breadth-first-search, and they'll get the job.
I, personally, wouldn't like to be hired at a firm that evaluates me that ridiculously. Yes, I'm a fresh graduate but thinking that knowing Dijkstra's algorithm evaluates my abilities makes me believe the whole culture is entirely deformed and I do not want to be fascinated by these ridiculous puzzles when I'm working with others.
Give them a week to implement something of larger complexity and they are drowned by so many concepts they decided to skip to earn an internship/full-time position at their beloved giants.
But I guess giants can afford having engineers that aren't that productive, or aren't doing projects that matter. I wouldn't like to be one of these engineers.
So, the real question is do you want that, or is the cash blinding you? :D
Books like these below can increase your chances significantly:
The best predictor of how someone will perform in a job is a work sample test (29 percent). This entails giving candidates a sample piece of work, similar to that which they would do in the job, and assessing their performance at it. Even this can’t predict performance perfectly > http://www.wired.com/2015/04/hire-like-google/
It's not impossible to solve those types of problems if you prepare ahead of time. I think that problem just requires dynamic programming/memoization, which is one of the things you're told to study beforehand.
Yet I get the same algo/ds puzzle questions that you should've solved before in order to solve it in an interview setup. Google reached to me and said based on my profile I can skip the phone interview but I'm so afraid of the interview that I postponed it multiple times.
I'm fine with algorithm questions only if I'm solving it in the same setup as my actual work where I have access to internet and can write some quick programs to test my ideas. I was good at solving pretty much any problem I had in my actual work. Even if I had to read a paper on the topic or learn about a new concept from ground up.
Google asks questions like pots of gold[1] where it's really impossible to solve it on a whiteboard if it's your first time seeing the problem.
I'm on hiring side of equation also. I get it, it's really hard to judge people. Even when the candidate have a GitHub page. I got a candidate from Hack Reactor where he had tons of contributions. But when I looked closely at those contributions they were mostly fake. Some other candidate had exactly same codebase in their GitHub.
[1]: http://careercup.com/question?id=15422849