Blog - Google interview

Added on Tuesday, 2010-03-16 20:00 CET in categories Moscow, Programming
Today I had my first Google interview! (Thanks to Wilmer, who made the process go a bit faster.)

This morning I got a call from Google Zürich, and got pretty much what I expected. There were some questions about complexity, algorithms, tree structures (red black trees e.g.), and I got to write some code.

For that we used Google Docs, so with a delay of a few seconds the interviewer could see what I was typing. I was free to choose the language, so I went with Perl. The first assignment was: write a function that returns the intersection of two arrays, in the order of the first array. The second: write a function that can calculate the average depth of a tree. (Try it yourself, they're not that hard.)

I had one small bug where I took the value of a node, not the depth of it, and I thought for a bit that hash map lookups are O(log(n)) instead of O(1). Must've been the nerves :)

The interviewer wasn't allowed to say how I did, so now I'll have to wait for a reply from my recruiter. Fingers crossed once more :)