Technical Google Interview Questions

You have to debug a crashing application. You are given the source. When you run it repeatedly in a debugger you observe that it never crashes in the same place twice. It uses only the C standard library and is single threaded.

What coding errors could cause the crashes? How would you find them?

Design a system to efficiently calculate the top 1MM Google search queries and create a report of these. Additionally:

  • You are given twelve servers
  • Each has two processors, 4GB of ram and four 400GB hard drives.
  • The machines are networked
  • The log data as roughly 100 Billion log lines in it.
  • The log data comes in twelve, 320 Gb files.
  • Each line of the files has roughly 40 search queries
  • You can only use open source software or software that you write.

Given an array A[N] containing N numbers. Crate an array Output[N] where Output[i] is equal to the product of all the elements of A[N] except A[i].

For example Output[0] is the product of A[1] to A[N-1] and Output[1] is the product of A[0] and from A[2] to A[N-1].

Do this without using the division operator. Do it in O(n).

You want to check that your friend, Bill, has your accurate phone number, but you can't ask him directly. You have to write a question on a card which and give it to Ava. She will take the card to Bill and then return the answer to you.

What should you write on the card to ensure Bill can encode the message so that Ava cannot read your phone number?

You have a closet with 300 shirts in it. Consequently, you find it hard to find a shirt quickly while dressing for work in the morning.

What can you do to organize your shirts to minimize the time that it takes to find the correct one?

Imagine you have eight balls, each of the same size.

One of the balls weights slightly more than the other seven.

Using a balance, find the heavier ball using only two weighings.