So, I had my screening interview with the recruiter from Google yesterday. And that went well, we just kind of BS'd for a few minutes. Then we set up a technical interview over the phone for today. I'm going to give a rundown of what today's interview was like, in case anyone cares.
Write a function (in whatever language you want) to find the next prime number after a given number. I decided to do mine in C.
So, the function declaration was something like: int nextPrime(int num);
If you want to, you should write the function, and I'll tell you how you do. This question was actually pretty cool, because I learned quite a bit in it. My interviewer (Mark) was very familiar with C, and taught me a few thing. I came up with a decent solution, then we talked about it... and made it better.
Then we talked a little bit about the representation of doubles in memory, and, if they can misrepresent an int.
If I gave you K sorted arrays, each of size N, how would you put them into one big array, and what would the big-O of the procedure be?
The first solution I came up with was to use a minheap.
Then we talked about what if the arrays were so big, that only 2 of them could fit in memory at one time (there is 2N available in memory). My first solution worked for this, but would have been slow b/c of harddrive accesses. So, I came up with another solution that merged 2 of them together. then merge the next 2 together...
The big-O of both of the solutions was O(KN log K). But, the second was better, because it had less disk accesses.
I asked him about his job. He loves it. Everyone there loves it. Its the best place on earth to work. He said I did pretty well in the interview. We'll see how it goes.
Sometime during the interview, my cell phone rang twice. Both times, it was WSU Career Services trying to reach me. They called to set Deloitte up to interview me. This would be a decent job, because I think they pay extremely well. And, I want to get a higher pay job than my roommate, because he thinks Electrical Engineering is a more valuable degree. I guess Dan and I are just competitive :)
Thanks for playing.