Tuesday, May 3, 2016

Google Zurich Interview Experience

TDLR: If you are interviewing for Google, please add C++ STL or Java core library to your preparation material.


I have been rejected by Google on April 5th for the second time in my life. This time I was very positive about the interview, which made it hurt even more when I saw the mail from the recruiter. Anyway going back to the beginning, just like most engineers I applied to Google multiple times and on February 16th 2016, I received a mail from a recruiter at Google Zurich asking if I would be interested in the position "Software Engineer" and if we could have a small chat on 18th. I replied as soon as I can saying that 18th sounds perfect. This wasn't an interview and he just told me about the interview procedure and asked me for couple of time slots for the phone interview. I decided for 29th February as it would give me enough time to prepare.

On 29th I got a hangout call at exactly 3pm and the interviewer introduced himself. He pronounced my name correctly and said the generally people in US say veejay instead of vijay, which is true! We went through only one question and it was little tricky, but not hard. I asked him questions before jumping into the solutions. After that we had around 5 minutes left and I asked him about Zurich in general and projects in Google Zurich.

Although I was very positive about the interview, I was tensed if I would get a call back or not. On March 2nd, I received a mail from the recruiter for an onsite interview at Google Zurich. I was very excited and fixed 30th March, so that I can prepare well again. After that I received required documents for the visa process and it took almost 3 weeks for my visa to arrive. Arrangements from Google HR were super quick. They arranged my flight to Zurich from Mumbai on 29th March and stay in Zurich on 29th and 30th March.

Finally on 29th March, I reached Zurich and checked into the hotel well before the check-in time. The hotel staff were really helpful and hotel room itself was very cozy. The best thing about the hotel was that it was 50 steps from Google Zurich office. I went to a restaurant in the evening for dinner and rested well that night. On 30th, I reached Google 10 minutes before and entered my recruiter's name in the visitor machine along with my details. He came down with in 5 minutes with my visitor's tag and escorted me to the interview room shortly. I had a bit of coffee to get rid of any lethargy before the long day of stressful interviews.

First interviewer arrived soon and after 5 minutes of explaining me about the interview process we got into the first question. The question was very easy and after answering with an algorithm, he modified the question slightly to make it hard and after few moments I changed my algorithm to work the new constraints. He again modified and the problem became tricky. Within few minutes, I suggested an algorithm with which he seemed happy. He asked me to code for the very first question and I implemented the algorithm in few minutes. We were left with little time and he asked me if I had any questions for him. I asked about his work and Zurich. Before he can finish answering, second interviewer was ready.

Second interviewer started with a well known question regarding Fibonacci numbers, slightly modified. I quickly understood the trap and instead of going with matrix multiplication, I went with pre-computation which made the complexity O(1). He looked satisfied and asked me to code. This is where I made my first mistake. I needed an array with dynamic length, without zero initialization. So instead of new int[n](), I wrote new int(n). I realized that mistake later in the evening, but thought it was too minor. After the coding it was time for questions and I asked him if there is any improvement we can make. He said that other than small improvements like using a constant length array, the code looked good. Then I asked him about his projects and YouTube, which he works on.

Third interview was open ended and was about performance improvement and debugging code. We started with a very basic algorithm problem and after coding the solution, the discussion continued towards performance in general. For performance optimization, I told the interviewer that I will look at high level algorithm followed by a profiling to check disk seeks, cache misses, buggy code and others like locking issues. Again it was the questions time and I was actually running out of them. I asked if it is easy to switch between projects and how often people do that. She told me that it is not often, but people do switch between projects and sometimes without any experience in the new field.

After that I had lunch with another Software Engineer and he showed me around. I loved the place, specially the lounge on the top floor, which has a beautiful view of the Alps! We talked about Zurich and trekking in Switzerland. As I had an extra day in Zurich, He suggested a near by place called Uetliberg. I actually went there the next day and the route and the view from the top were beautiful. After lunch we came back to a new room, where my next interviews were scheduled. We were waiting for the next interviewer and since I knew that the next round was system design, I was already nervous and was reading from my notes.

Next interviewer showed up at the exact scheduled time and within a minute, he was done with the introduction and gave me a design question. The question was designing a single system for a task rather than a network. After asking relevant questions about cache and storage capacity, I started off with a mathematical error while computing the bandwidth needed. After that we moved on to the main problem and while designing it, I was stuck twice and he gave some clues. We were in the middle of it, when the next interviewer showed up. Previous interviewer wished me luck and I am still unsure how it went.

Fifth Interview was again an algorithm centric one and the question wasn't hard. Although I took around 5-10 minutes after he modified the question the second time, I solved it in time and he looked happy. Then the horror followed. I designed a BST of strings with an integer attached each string. I wrote dummy functions like search and insert and told him that I can implement them if he wants. After I am done with coding, he went through my resume and asked me if I ever worked with STL. I told him that I only used that for coding competitions and that I recently moved to C++ even for those competitions. He told me that I dont need to implement BST and the whole thing can be implemented with a class in STL and asked me if I know which one. I took a minute and answered map. He said okay and asked me if I have any questions. I didn't think much of this and asked him some questions related to maps and connection between Google and Acedemia.

The last interviewer escorted me to the front door as per their protocol and wished me luck. I was very happy that I answered all the algorithmic questions and I read it somewhere that Google generally hires if 4/5 engineers say yes. So I thought a negative review on System Design round would be fine as others went really well. After spending one more day in Zurich walking around the city and hiking across Uetliberg, I returned to Mumbai on 2nd April.

Within 5 days after the interview, I received the mail from the recruiter saying that they will not be proceeding further with my application. The reason given was "As to the rationale, although your knowledge of Algorithms and Data Structure was really good, the panel thought there was still room for improvement in your coding abilities". Despite being sad that I missed the golden opportunity once again, I am little more confident about my problem solving skills. Although I am little ashamed to admit, I have never worked on a C++ project and I always used cplusplus.com for STL classes and their functions in coding competitions. At my work I use embedded C entirely and C for linux drivers. My other projects are web based and I use PHP, SQL, HTML and JS.

Overall, I really enjoyed the whole experience, thanks to the recruiter, HR and the Engineers. I hope to go back someday and claim my space at Google Zurich :)

PS: I did not discover anything here. My recruiter sent me a list of things I should work on and I prepared for everything but STL. Do not make that mistake. Good luck :)

No comments:

Post a Comment