It is the first technical interview with a software engineer from Google, second phone call after an informal call with the recruiter which had two simple questions about complexity. One interesting point I was told by the recruiter, that he considered Ain Shams University a good one. And honestly, I was impressed and wondering as we didn’t have many graduates at Google now. Maybe only one? Well, recruiters must have their ways!
Getting ready
Long term
I knew about ten days prior to the interview so I had enough time to prepare. I started asking recent interviewees about what to expect and any advice about the topics to try to cover and revise. Searching on the web for any other interviewees and read their experience – and this is what had encouraged me to write that post as I found it very helpful. I made a list of all the topics which has been mentioned or advised to revise. It was mostly about data structures and algorithms plus a bit about operating systems and other general computer science concepts.
Had ten days, so yes I was able to finish all what I expected to finish, except one topic: dynamic programming which I thought from opinions that it’s a bit advanced for the first interview. In addition to solving some TopCoder problems, which was not more than two daily and I consider that was low and it should have been increased.
Short term
On the night before the call, I came home back early, prepared some blank paper sheets, pens and some notes which I thought they might be useful. Checked the Google doc -which will be used for coding- to make sure it was connected. Prepared the headphones for the phone and a charger plugged in. Before sleeping, I solved one DIV 2 500 on TopCoder and went to bed early. However, it took me a while to fall asleep but it was okay, as it was a weekend – Friday is off.
It is two hours before the phone call. Had a look on binary trees and then watched an episode of Friends, thought it would take me out of stress. Then solved a DIV 2 250 to warm up and not exhaust my mind. About 30 minutes before the interview, went to get some tea, walking around the apartment and listening to music. Three minutes before the call I went into the room and closed the door. The phone rang!
Interviewing
I have read more than once from other candidates’ experience that it is not allowed to talk about onsite interviews, but I wasn’t told anything concerning the phone ones, however I think it might not be very easy for the interviewer to have to develop two new problems for every new interviewee.
He welcomed me and introduced himself and told me there will be two questions. It was short and he got directly to the first question. It was a problem and it took me some time trying to understand and analyze the question especially the input and output. I was quickly able to find the brute force solution of O(n2). Being used to TopCoder and small input, no need for other data structure when the input won’t exceed 50 so I thought of this solution at first and it took me some time till I was able to try to think smarter – mistake 1. He asked me to code the solution I have just said using any programming language – don’t he considered C# one. He said he prefers C++ or Java as they use those languages in most of the projects in Google. I was told that I have two bugs. One of them was forgetting first initialization of a variable and the second one was writing = instead of == in an if statement.
He asked me if there was a better solution, I started to think again and try to get out of the box which I stuck myself in – mistake 2. I thought of a solution which involves sorting and then binary search leading to complexity O(nlog2n).
He said that it could be solved in linear time. I thought that it might be represented by a linked list. Then he told me what about using a hashmap. I got it by then, but it was obviously too late. Then he asked about what the key would represent, I answered that. He asked me how to write that using C++, I wrote the mapping but not in the exact syntax – mistake 3.
The end
After that question, the call had been going for 45 minutes so he told me we have run out of time thus there is not time for the second question which was planned. I was like “No, wait! Please, don’t leave with that impression; I want to have the second question : (”
Lessons learned
The question was not that hard, but I was not able to answer it correctly due to two main reasons and a smaller one which I could figure out so far
- I was over worried even inside the interview, sometime I feel my mind is blocked and like someone suddenly rises and talks in my mind “MAN, YOU ARE TALKING TO FUCKING GOOGLE! CONCENTRATE!” and other negative thoughts thus of course I did not concentrate but the opposite happens. This resulted in having some bugs through the code at first and not thinking about the idea of hashing. Although I had read that and even there was a quote by “Arnie Widdowson” on some website saying “when in doubt use hashtables” but I forgot that as if my mind was empty! Also, I think my explanation was not very clear.
- I should have thought outside the box. I felt my thinking was kinda limited into the TopCoder problems. Of course, it is my mistake that I focused only on one type and didn’t open my mind well.
- Another one which I consider it a bit less than the two above, which is know more about the syntax of the data structure not only the concept. Like in my case, I could even build the class but I did not know how to initialize and use a hashmap in C++!
Right after the interview, I hated myslf and felt stupid! But about a couple of hours later I started to think and figure out the problems. That was my first experience with Google, short unfortunately. If you have been interviewed with Google before, it will be helpful to post your experience as well. Thank you : )

Thanks for the cool article dude …
I’m sure you will pass the interview successfully one day
Between …
this is another related post
http://www.catonmat.net/blog/my-job-interview-at-google/
I’m sure you checked it out before you entered the interview
Can you give us all the links you found related to Developer’s interviews ?
Thanks man : )
http://google-interview.com/google-interview/post/2008/03/12/Get-that-job-at-Google.aspx
This could be the main and best one so far and you should definitely study it before being interviewed! And you can ask search Google for topics about Google interview, you are gonna find lots. Read as much as you can till you know what to expect.
My best advice -or at least according to my mistakes- is be calm, it’s just an interview!
Alsalam alikom wa ra7mat Allah wa barakatoh
First of all, congrats for going through that experience…
Secondly, big thanks for sharing it, so that everybody can learn from it..
I believe, as you said, that if you made a big deal out of it, you will get distracted and won’t be able to focus on solving the main problem…. some interviewers are better than others in absorbing that and making you feel relaxed, the one you meant doesn’t seem to be from that type…
In Shaa Allah next time (in Google/others or your own company) you will deal with the situation in a much better way
Rabena yewaffa2ak…
Hey man, I’m soooo happy for you
.
Happy !! yes surrrre
, I’m happy that you specifically specified your goal and went for it DIRECTLYYY. Yes, it went wrong but in the right path. And we, not only you, learnt alot such that next time, I’m sure it will be so soon isA, will go very well.
God bless your steps man, you are up to it
(Y)
btw, did you just post your CV there, or for a specific opening !? and how long did they take to respond !??
Jazaka Allah khayran for posting … wishing all success for you
Thank you : ) I sent my CV through an employee there. And you can also apply through the website.
As Haytham said, thanks for sharing this experience. The best thing you did was listing the reasons you wasn’t able to answer that question. Keep on trying and learn from such situations till you hit the target isA.
Hi ahmad
im sorry about what happened to google. try not to be to disapointed, but instead be happy that you had the experience and the chance. And from reading your article i can see you have learnt alot from your interview:)
i hope your ok and university is ok.
Thank you Ahmed for sharing us your experience, It’s really helpful…
Hey,
I am Hisham we met 2day ……..
I also failed to pass Google interview.
First one was with the recruiter. General questions…….
The second phone interview was with software engineer from Google…. I have passed this one……. Most of questions was related to algorithms and datastructures. Some questions related to protocols http, TCP, UDP, DNS,……. he also asked me to write some code……
The third interview was with software engineer from Google………. I didnt pass it…… He gave me one question…It took me a while to understand it…… It wasn’t hard, but it was tricky…… I solved it in 45 min which is the time of the interview
…….
We de 7ekayty ana kaman ma3a Google
Good luck
What was the question Hesham ?? and the answer PLZ
Many thanks Ahmed, this is really an awesome post, Hope you better chance next times isA. Believe in yourself, My advice is to take your time and don’t try to make the next interview very soon, take your time to be new Farid or Farid++ : ))
dude, just you stick to Microsoft for now, u r no match for Google :p
seriously .. i like it, i love how u jumped into it too
best of luck in the next time.
What do you like exactly? Btw, this post is over a year old now.