Feeds:
Posts
Comments

What is it?

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 : )

How much do you know a person

The degree of correctness of the image built for someone in our mind usually varies according to the time of building that image since knowing them.

1st phase, prejudgment:

It is the idea formed in mind even before meeting a person due to previous gained knowledge through experience in dealing with people. It can be like the probability of the presence of a certain characteristic in them. This is obviously wrong as it is only predicting according to the previous knowledge of others which might not always be true.  What can make it worse, when being subjected to a prominent event that highly affects one’s judgments towards a certain criteria. Like for example, someone who was treated badly by a single person in a country so he thinks all the people of that country are rude.

If this experience was gained, not due to person prejudgment but even from others the effect will be multiplied. You can notice that the prejudger uses plural even when talking about a single person.

Prejudgment or prejudice could also be called generalizing which it may lead to racial discrimination.

2nd phase, first look impact:

After meeting a person or could be even the very first period of knowing them. At this period, the judger starts mixing his prejudgment image with the first image he encountered when dealing with this person.

The first impact is very strong, especially if there was not prejudgment the first impact takes control of the judger and can disable the mind as one’s mind is already satisfied with the idea which was formed during the first impact with that person.

It’s obvious that this time of judgment is mostly wrong as it forms an image of a person by appearance or by a onetime situation. Usually people discover that, but sometimes it is too late; like for instance trusting someone you shouldn’t and getting conned by or something like love at first sight.

3rd phase, getting to know:

This can be a considered, somehow a safer time to say you can know a person after getting to know them more through further interactions between each other and spending more time together.

4th phase, knowing their lives:

I was not quite sure about that forth phase except recently when discovering people more who I thought I know pretty well for a relatively long time.

One of the best ways to know a person is to travel with. It may be thought that it is more likely to say “stay with” which is a good way to know someone indeed, but in traveling you discover much more about the inside of the person which you think you know. Maybe because when one of you moves to stay with the other the situation is not exactly the same for both of you, but in traveling you are both equal in everything. So there you get the chance to discover their way of living, facing problems, way of thinking, planning, dealing with people, internal thoughts …

I think that this should be the only way that you can say if you truly knew that person or you were mistaken about certain points and that was what I figured out recently. now I started to wonder what had my recent travel partners realized later.

The more you delay the time of drawing an image for a person, the more accurate it is. And keep it ready for updates all the time for changes; as you’ll never get to know a person 100%.

A purposeless life

During any football match each member chases a piece of rubber called the ball and trying to let it pass throw a rectangular area called the goal. Aiming at achieving that they exert a lot of effort and people enjoy watching them trying to do so.

Now imagine while you were watching some match, someone came from behind and removed the bars & the nets of the two goals. What will be your reaction? Will you keep watching? Will the players keep playing and struggling? What will you think about the players if they went on playing with no goal ? Let’s say that they are playing for enjoyment. Will they keep passing the ball forever? And you know what, whatever they do, the ball will go out at sometime. Simply because everywhere is out as long as the goal is absent.

Now after you’ve got the ball at your feet. Do you know where you are going to shoot? Or you will only keep running with the ball till you get out of the field achieving nothing?

Circles

Build up that image in your mind and imagine it clearly. The life of every individual on earth can be represented as a circle whose radius elongates by time. The area of this circle represents the experience, knowledge gained and time lived by that person. Intersection between one or more circles represents a certain type of relationship between them. For instance, you will find your circle intersecting with your friends at university or school and that the area of the overlap will be larger than the overlap with your friends at work in case you haven’t known them for long time. And here’s your brother’s circle intersects with yours and your life partner’s as he gets in touch with both of you. Lots of circles will be intersecting at a certain area like area of work for example but it will be quite small, on the other hand only a few circles will share a large area with you which represents people closest to you like your life partner, your best friend or a close member of the family.

Overlapping won’t be only in case of long term relationships. Just you going to buy something from the grocer’s or having your hair cut at the barbers’. So overlapping is any interaction between you and another individual no matter how long it takes.

Unfortunately due to difference in way of thinking, education, standard of life, age, experience and lots of factors of life conflicts arise. Some people are not flexible or adaptable enough to be able to intersect with other circles without causing troubles to themselves or others. So you’ll either expand your area of intersection or stay isolated. Live together or die alone.

I was thinking about the top two intersections. The first in terms of area and first in terms of number of circles meeting at the same point. The first one I guess it can be your life partner who you will be living with for the rest of your life. For the second one, I think it will be for the greatest number of people doing the same thing and having the same thought at the same instance. I think a picture will do a better job in that case. You’d better see it at full size.

The little child kept talking to his father while he was reading the newspaper. The man was concentrating on a map in the newspaper that he flew into a rage because of his irritating child and torn the page of the newspaper. To teach his child a lesson he gave him that page which was having the map on and put him into his room telling him not to get out until he had put the torn pieces of map into right order. That was considered to be a very difficult task; how will the little child know the continents of the world. To his surprise he found his son coming out after a few minutes showing him the map in the correct order. The man wondered a lot and asked his son how he did it in that short time. That was the little boy’s answer “If I had managed to fix the earth I would have failed. I looked at the opposite side of the paper and found the face of the human. I fixed only the human and consequently the earth was fixed.”

Why not you? Why not you change the world? Thinking it’s too late, well then let it be your child who would change the world not just live and die as an anonymous. Why not take a decision from now that my son or daughter will be the person who will change the world. Work for that from now. Choose your partner who will bring up that person. What will change the world other than a sperm and ovum from a couple with challenging enthusiasm?

I am rude, therefore I am strong

When you are walking down the streets, when you come to interact with people or see how people are acting with each other, you will realize that everyone hates the other unless otherwise shows up & may be will still hate you and treat you as an enemy. I was in a bus going to university then that situation happened. One of the passengers told the driver in a rude way that he wants another banknote because the change he was given was badly torn. Logically – and yet not so normally – the driver replied in a worse accent “Look at the money you have just given me before you open your mouth”. Two people who have never seen anything bad from the other are just treating each other as enemies. As if giving the other torn money is an insult. Why do people like to show anger and hatred? Is it for showing strength? Dignity? Honor? I don’t think so, but unfortunately they do think so. The most honorable man Prophet Muhammad would have done as they did when he was hurt. Or they think they have more dignity than him? When will the outrage is replied with goodness, you will be able to beat yourself and yet feel you are the better whatever the other thinks about you.

When I first knew about the acm-ICPC, the regional contest seemed like a far dream and even the summit of my dreams then. When I used to see the picture of friends who had been at the previous regional contest in Morocco and Kuwait I flew away with my imagination that I am at their place, but yet the world finals never came into my mind.

Today something happened that made me remember those moments mentioned above. I was checking the pictures of the team that had been to the world finals this year from Egypt from Cairo University who had won the last regional contest. So I remembered that and thought, is it possible? Last local contest I didn’t think we would qualify for the regional contest at all but we did take the first rank which I still don’t know how and think we were not the best. Now it’s nearly the last chance the next regional contest to qualify to the world finals, may be the preceding one as well but it’s yet too early to judge. But now, the circumstances are somewhat similar so shouldn’t I be optimistic?

Follow

Get every new post delivered to your Inbox.