Home > Uncategorized > List of all google interview questions

List of all google interview questions

If anyone wants to put some answers you can do it here: http://questions.letschat.info

Questions
Algorithms, complexity analysis, CS basics, thinking on your feet, whiteboard coding. Know your stuff.
Why do you want to work for Google?
Text parsing problem, but not very well specified. Expected to create detailed specification and to solve problem.
How to merge twe sorted arrays into a new sorted one?
Tell us about the most difficult challenge you’ve faced within the past year and how you resolved it.
Signed an NDA so I’ll respect that
What is AdSense?
What data structures would you use to model a family tree?

How can you determine whether two persons are related or not?

How can I get to some gold in the middle of the amazon in the cheapest way possible?
Given US denomination coins, what is the algorithm to make change for any amount?
Complexity of Binary search algorithm
Explain what happens when a user logs onto a website
How would you contribute to the day to day company function?
Talk about your design process. How would you approach a project?
Design a new interface for an existing comment system.
Select K largest numbers from N
How many Google searches occur on your campus per day?
What is your most significant experience?
They asked me to implement malloc in strict C after I asked for a c++ interview. I know I should have been ready for malloc, but I never use it and stumbled.
You suspended a clients account and the sales manager is complaining to you to reinstate the account because the client is one of the biggest google adwords client. The client was in violation of google policy. What do you tell the manager?
How do you organize or prioritize when you have 4-5 projects given to you at one time?
Given a node in a binary tree find the next greatest value in the entire node.
Given a string with only ‘)’ and ‘(‘ find if the string is complete or not. If the string is complete means that each open paranthesis should have a corresponding closed one.

Eg: String s= “((()))()”- Complete String

String s1=”)()()()())))(()()()((” – Incomplete String

Implement a function boolean matches(String text, String pattern) to find match pattern in the string, pattern can be seperated but the order of letters in pattern cannot be changed.
Implement an interface to statistics the frequency of new value added.
If a sales manager does not perform or misses his targets, what would you do?
What if you were Larry page, how would you direct the company?
Write a function to determine if a string (consisting only of parenthesis) is balanced.
textbook algorithms questions
I have a coin, I tossed 10 times and I want to test if the coin is fair.
Tell me about a time you built something?
Logic Riddle Question
What is your research topic and how is it related to Google products?
Redefine a function (signature given) to write data to a new replacement for an antiquated database (which you previously designed)
Write a function to return the longest common prefix between two strings.
I signed a confidentiality agreement.
Estimate the total storage size of GMAIL
Data structures, algorithms, and OOP.
Make an algorithm to extract the skyline from the rectangles.
what scope BW to be used to measure a fast dv/dt(xV/us) waveform?
Basic data structure and software design questions
How do you fit in with Google culture?
String replacement coding in Java.
About a specific sign
Why are you an effective R&D leader? How do you handle people who are not team players?
Questions about Network: Subnet, linux command for networking, windows command for networking, OS X commands for networking ( for example ifconfig, route, tracert etc…)
You notice that adwords revenue for a certain word has dropped in Italy for the last 30 days. How do you go about determining why that has happened?
What is the difference between hard and soft links in Linux/Unix?
What would you do if you were the GM of Apple?
How would you built a restaurant search product?
Items are pushed onto a stack, and therefore may be accessed in a last-in-first-out (LIFO) manner. How might you access these items in a first-in-first-out (FIFO) manner?
Implement a blocking queue in Java.
Implement a system to serialize and deserialize strings
Write a program to comparing two array, one being very large
problems regarding analytical reasoning
What is the best way to sort a terabyte of array of data, when you have limited RAM (500k), and each array element has a couple of items of data, at about 1-10k each.
What is the product you are most proud of releasing and why.
What was the hardest problem you’ve ever solved and how?
How do you implement a hash?
We have a schedular. Timer is available to the schedular. The clients of this schedular want to call this schedular with 2 parameters, 1) time interval in ms 2) callback function. The schedular will invoke specified callback function after specified time intevals. Design data structure and implement it.
Find the intersection of two integer lists
1. Compare HashTable and Binary Tree(pros and cons, why use binary tree in some place, the time complexity of insert, delete of hashtable and binarytree)
2. favorite sorting algorithm and why, advantages
If you have an unsorted array of numbers from 1-100, except 1 of those numbers is missing, how do you determine which number is missing
How do you think about dealing with the work relationship with your colleagues?
I cannot disclose technical questions.
algorithm of graphic theory
describe the recent project you have done.
describe breadth first search
What is the biggest bug in your previous code
Hashing with big numbers.
What is prototypical inheritance and why would you use it?
Desing a 4-way software cache driver.
Signed an NDA which I’ll respect.
What is the difference between an interface an an abstract class in Java?
Write a Java program that takes a 2D bitmap (represented as a 1D array of integers), and reverses it about its vertical axis.
If you have a network of computers and one of the computers has a massive file (e.g. tens of gigabytes), how would you copy the file to all of the other nodes in the network?
Why do you want to work with this company
if we had a list of n nodes, what are the maximum number of edges there can be for a directed acyclic graph?
basically code prims algorithm
What is Adwords advertising
explan difference between display and contextual ad serving
Write an algorithm for integer multiplication
There were some very obscure MySQL questions on the written skills test, asking about mysql-specific auto-increment SQL syntax and update commands with joins.
Give me five non-traditional metrics to measure your sales team?
What ideas do you have for Google?
Phone: resume, custom queue data structure, list manipulation in Python, SQL, couple other short questions (no code)
Onsite: binary search trees, string manipulation, designing a cache, recursion
Both: Big-O analysis, optimize, design test cases
Merge 2 sorted linked lists.
Given a set of intervals(time in seconds) find the set of intervals that overlap
Have you ever found yourself in a situation in which…bla bla bla…problem solving, team working, colleagues issues, learning situation, teaching situation…?
Remove duplicate lines from an large text.
Some tricky part of hashmap
What is your proudest achievement to date?
How heavy is a Boing 747?
How much money makes Google with Gmail?^
Delete an element from a singly linked list in Java
Given a string, find the minimum window containing a given set of characters.
Can an abstract class be instantiated in Java? And does it have a constructor?
What’s the difference between finally, final and finalize in Java?
design an algorithm to check if there are overlaps between a group of intervals
How many balloons fit inside of San Francisco?
what can you do to improve Google search engine?
Implement ‘memcpy()’ in C
What is the sticky bit and why is it used?
So you graduated with a pretty good GPA. How’d you do that?
Questions related to probability and statistics.
why do you want to work at Google
why are you interested in this job?
how many houses are painted red in canada?
Pitch adwords to a small flower shop in 30 seconds.
Sell an ipad to a grandpa
Out of 10 coins, one weighs less then the others. You have a scale.
How can you determine which one weighs less in 3 weighs?
Now how would you do it if you didn’t know if the odd coin weighs less or more?
How do you design a high-write, high-read database.
Given a list of integers that fall within a known short but unknown range of values, how to find the median value?
Describe a time when you had to tell a client that you couldn’t meet a deadline.
Tell me about a situation when you had to multitask.
Questions in first round:
Write a method to pretty print a binary tree. Don’t make any assumptions, i.e. the tree could be highly unbalanced.

Given a dictionary segment a piece of un-spaced text to find meaningful words. e.g “makemytrip”->make my trip

2nd Round:
A design question (don’t remember) and another question on adversarial mini-max search

3rd Round:
Write a method to find the next ancestor of a node in a Binary Search Tree.
Write a recursive function to convert Binary Code of a number into its equivalent Gray’s code and the other way round.

4th round:
Given two sorted arrays, find the kth minimum element of both.
Given a set of intervals, find the interval which has the maximum number of intersections.

5th round:
This one was focused on previous projects and experience and how good I was at what I had been doing.

At this time I do not remember any direct questions but know that most questions were based on your personal thinking process in approaching a problem and correcting the problem.
Code an application that creates a new thread and exposes a “ping()” method. Whenever ping() is called, the thread prints “Google rocks” once.
what do you do in your spare time/when not working
Convert char string to integer.
Find occurrences of a number in sorted array (allow duplicates).
If integer array used to store big integers (one integer store one digit), implement arithmetic operations.
why do you want to choose Google?
where is your edge?
Based on data structures and algorithms. Can’t post the original questions as I signed NDA with them.
onsite interview: implement timers write code as if you are writing them in 1 single for loop in kernel.
To generate a fibnacci number sequence, and discuss its time and space complexity.
To merge two sorted integer arrays.
Array of 100 integers from 1 to 100, shuffled. One integer is taken out, find that integer.
Same as above but another one is taken out again. Find the two missing nubmers
Explain how quick sort and merge sort work
Why Google and why this position?
Estimation problem
Let’s talk about Google Docs. Let’s say we wanted to offer offline functionality, and we want to automatically make some documents available offline. How would you go about deciding which ones?
Describe how you would diagnose and repair a printing problem?
Cominations of strings.
Given inputs from Google Search, you have K chunks. Each chunk is individually alphabetically ordered (apple, banana, cat) … (*apple, *banan, *cat). You want to merge all chunks into a single list. How would you do it? What limitations are there to your approach?
It’s on an x86 processor, what does that mean and how does that affect your approach?
What is the biggest software project that you have worked on and how.
Some areas they will definitely touch — OOP, strings, and data structures
How would you push out a software update to a multitude of clients.
SQL question related to self-joining and reasons for doing same.
How would you design a bike GPS unit?
Why this industry?
A difficult string manipulation question that had to be completed in C++ or Java
A system level question of how to extract information out of a very large file
How to find the max number of a shift buffer queue. For instance, there is an array like 5, 6,8,11,1,2, how to find the max number, which is 11 in this example.
Judge if a Sudoku solution is right.
What is the biggest mistake that you have made and what have you learned?
Questions about algorithms and data structures.
Write a program to compute if one string is a rotation of another.
Addition of 2 big numbers (represented by 2 int arrays, assuming each integer can only be 0-9)
How many people do you think are using their cell phone in the entire world at this very moment?
What are different ways you would troubleshoot client issues regarding analytics?
data structures and array manipulation questions.
why google
Given two sorted integer arrays, write an algorithm to get back the intersection.
Given the daily values of a stock, find how you can lose the most with one buy-sell trading.
Given a set of strings, a number ‘n’, and a function that takes a string and gives back a score, find the n largest scored strings in the set.
Given a matrix of 0s and 1s, write code to get all the different ways of getting from a given cell to another, such that you can’t walk through any of the cells with 0s in them.
Trees, hashing, sorting, recursion. Nothing particularly hard.
Write perfect code to generate all possible permutations of a string w/o repetitions and only using constant memory.
Why do you want to work for Google?
Large data set, in memory sorting with limited RAM
I can’t really tell about the question, but they vary between different problem solving questions like trees, string manipulations and complex recursion.
Eliminate replicates in a string
Describe what you will do to enhance the indexing performance of the map service.
If you were CEO of your last company, what would you do to change it?
How long have you waited for us to contact you?
Reverse all the words in a string
Tell me about your experience?
Tell me about a time you had to overcome differences within a team environment.
Write the binary search.
Analyze quick sort.
typical CS interview questions, as listed above
Quad tree
If you were to describe yourself as an animal what would it be?
Typical Bayesian question
What metrics do you use to evaluate two search engines?
Write a function to modify a singly linked list, appending copies of the first N-1 elements to the end in reverse order. For example, [‘A’, ‘B’, ‘C’, ‘D’] becomes [‘A’, ‘B’, ‘C’, ‘D’, ‘C’, ‘B’, ‘A’].
Given an array of structs: write a function that finds equal values in all the structs in the array
Game of Life – write a function to calculate next state of the board based on current state
You have a n number of cities. Lets say city 1 has some information that needs to be sent to all other n-1 cities using minimal cost. Cost between each pair of cities is given. any number of cities can transmit the information once they receive the information but the overall total cost should be minimum
Given two numbers m and n, write a method to return the first number r that is
divisible by both (e.g., the least common multiple).
If you have a ransom letter and magazines, can you construct the ransom letter from the words in the magazine.
What are the 3 major changes you would make on a Google Product ? Once you have made those changes, how will you make it a billion$ product ?
How do you control Spam on Social Networks ? How can Google counter Facebook’s threat
Can you code an entire webpage with this marker on a white board in 10 minutes? And add hidden issues to see if I’m able to find them.
If you look at a clock and the time is 3:15, what is the angle between the hour and the minute hands?
Given a a new dictionary of words in English alphabets but the ordering of the alphabets are not necessarily as the English alphabets, that is, say c comes a in the new alphabet series. Hence, the dictionary would also contain words in a different ordering than the usual dictionary. If you are given enough words in this new dictionary so that you can find enough relationships between the new series, find the new series.
I won’t disclose those questions due to NDA but I’m gonna tell you they were not difficult. Just show yourself. Maybe you can find those questions on glassdoor, I’m not sure. I’ve gone through the first 15 pages but I did not find any match.
AVL tree
Implementing a system for fast anagrams retrieval given a large file of words
explain binary search, running time, when is it advantageous
there was an odd ball in the 8 balls you have to find out the odd ball with 2 weighs
Why man holes are in round shape?
Do you know what the IETF RFC 1918
Describe your research background.
How would you evaluate whether a carbon offset project is additional?
Given a set of paramters, including IRR of two different projects. Would Google invest in the more efficient of the two boilers?
Describe your experience working with crossfunctional teams
Tell me something about your design process.
Topics: Filesystems, networking, scripting
I will not write the question
create an algorithm for a problem, optimize it, O – notation
What if you were a google travel manager
How would you design and develop a URL shorting service
Given a generic tree, how would you pick a node at random with uniform probability?
Write a code to find out if two string words are anagrams
derive the formula for the variance of OLS from scratch
how you evaluate the effectiveness of google mail with respect to persuading people using google more frequently than our competitors, say, yahoo, you can imagine you can get what ever data you could, – tell me what data you would like to collect and how you want to use them, and what potential insights would you expect to get out of them?
What is Google Ad? How would you handle a difficult Google ad consumer?
What is the bandwidth necessary if Google Docs is on the moon?
Write a code to find out if two string words are anagrams
You are a PM and about to launch a photo sharing site, what would be the size (as in terms of Terabytes) of your server.
This is for the customers in US only.
How to make crawling better, so that better search results are displayed?
How many ping pong balls can you fit in a school bus?
What is Google’s mission?
Should there be car pool line during rush hour?
what happens when you type: google.com in the browser
difference between get and post in forms.
write a program to translate alphanumeric phone number to numbers only
“Please define these random Object Oriented Programming terms”
Write this function (on a Google doc):
/*How many ways can you make change given the following denominations? ie, if numCentsToMake is 6 and denominations is [25, 10, 5, 1], then it should return 2: either a nickel and a penny or 6 pennies.*/
int numWaysToMakeChange(int numCentsToMake, int[] denominations)
how would you implement a web search engine?
how would you find the shortest path between two nodes in a social network?
you have a sorted array of real numbers drawn from the uniform distribution between 0 and 1. How can you quickly find a number in it?

This was the last question. They had me implement it on my own and send it back to them.

Create a graph class and graph traversal algorithms.
Why would you like to work for Google
Design a database system for a global company like KFC
Describe the different ways prosecution of a patent can end.
You have 7 balls. One weighs more than the others (not significantly). You have a scale, like the scales of justice. Describe how to find the weighted ball only using the scale twice.
What is the patent litigation process.
If a change in a product made Google less money over all and even would reduce the revenue of partners but might save money for the consumers should Google still do it?
Calculate the value of adding adds to a previously ad free web property.
Why Google?
how do you install packages in linux
What is the data structure behind hashmap
How to send (once) 10GB of data securely to a location several hundred miles away?
When you type www.google.com on your browser, what happens?
Maximum contiguous sub sequence sum problem.
LRU-cache
Describe inheritance, virtual, etc. in C++
Would you use threads or processes in this situation? Why?
Write an algorithm that…
design a email system for young students
Do you like technology
How would you analyze a certain lawsuit?
Question about building a team and how to get them excited.
Implement a hash table
Create a database and two tables in MySQL with the data provided.
Join information from the two tables to create an average score (of the data given to insert into table)
Write a script in PHP to access MySQL and extract all data (both tables) into basic HTML.
How many people will take a particular bus route today
find the median of million rows in each of the 1000 servers.
what is the best way to sort millions of records
How would you reverse a linked-list?
Find the most frequent letters in a string.
If you have a vacant field and add one flower and the number of flowers doubles everyday and at the end of 45 days, the field is full, on what day is the field half full?
What is the refractive index of a particular fiber optic cable
Describe on the the business model of one of our customer
Your client wants to estimate the market size for jeans in the U.S. How would you go about doing that?
If your customer calls you on the phone and tells you her light-bulb is broken, how would you go about fixing the problem on the phone?
How to find anagrams in a sentence ?
What was your last performance review in your current company?
What’s the complexity of insert in hashtable ?
What makes you “Googley”?
How would you attempt to reduce the learning curve inherent for a new employee in this position?
What is the revenue for Wal-Mart?
How many people in China have internet access?
Google asked that I did not review any specific of the questions asked.
Design an algorithm to do X, then analyse the complexity.
Here a situation and some code, what to you think about that?
Write a short method to perform a simple, common operation. Now tell me what could go wrong. How would you fix it?
Here’s a situation involving gym lockers that I’ve been wondering about. What do you think of it?
theory of NP problems
What keeps Larry Page up at night?
Given a graph, find if it represents a tree.
Priority inversion, and how to solve it.
Develop an iterator (has_next, next).
Find the longest word in a dictionary, such that the word can be built one character at a time, and all substrings are words in the dictionary. A new character can be added anywhere.
Discuss data structures for reading URL->File content (crawler data e.g.) and remove duplicates.

Find a number in a sorted array with duplicates in O(log n) time.

Card game, given 4 cards. If by +,-,/,* and () you can make 24, you win. Write a program to play this game.
Where do you see yourself in 10 years?
Why do you want to work here?
(analytical phone interview) What would occur on earth if the sun “went out”?
Give me your brief life story.
What Google products do you use?
create a contingency plan for a 100 googler event that has a forecast of rain
What are the side effects of typing your password in the user name field?
name a google product you use and what would u change about it? how to improve it?
describe Ad words in three sentences to a child..
Sizing/estimation questions, name a web product and brainstorm on how to improve it, market understanding, coding/sorting algorithm question.
Deep search binary tree, what is the worst case memory requirement using Queue.
How would you deal with a difficult customer?
How do you increase computer speed?
How would you determine if someone has won a game of tic-tac-toe on a board of any size?
How would you help your friend market their business online? How do you increase search rankings for his website?
estimate no of hospital in India
what are the challenfes to google
How much storage does Youtube.com need?
Not many difficult questions, but the interviewer woukd not let you think and answer.
Probably shouldn’t disclose the first interview question as they made me sign an agreement and the first question was unique from anything I have seen as an interview question. This was a question that would not have been able to have been completed within the 45 min.
Fibonacci numbers… haha.
What do you want to talk about today (very vague question as an attempt to derail your expectations of a typical behavioral interview where the interviewer is the one asking the questions)?
What are you most proud of (asked by VP)?
Would a stack of quarters the height of the Empire State Building be able to fit into a normal-sized room?
Be prepared to dig deep into your skillset for the program manager position this included 3 skillset interviews.
What can you bring from your current industry to google?
Given a large web query log file, how to find the most frequent K queries
Given a string of characters, find the character with the highest frequency.
Design a networked ‘snake’ multiplayer game. What are the problems and issues to be solved? When the network ‘splits’ I want the game to continue for all players.
Given an array of numbers, there is one number that has a duplicate. How would you find the number?
How to deal with public concerns, such as location privacy issues, etc.
what’s your favorite project and why?
how to build a heap?
Describe the difference between TCP and UDP
How many people use Google Maps in your country?
What is your familiarity with Google Goggles?
How would you launch YouTube in Turkey?
What’s your favorite Google Product? How would you improve it
Which 2 products do you like about Google and Why?
Does gangaram hospital need to market?If yes what do they need to market and why?
if no , then Why
Do you think Hindustan Petroleum needs to market?If yes , why, and what do they need to market?
Competitors
How would you explain the daily deal process to a 5 yr old?
How many airplanes are there over German airspace right now?
How many Google searches are done per day on average in the UK?
Tell me about your background
Why are manhole covers round?
implement dijkstras algorithm
How many golf balls can fit in a school bus?
Imagine you have a closet full of shirts. It’s very hard to find a shirt. So what can you do to organize your shirts for easy retrieval?
How would you write a class that verifies a Sodoku
Design a study (x6).
Given a machine hangup how do you trouble shoot the problem, open ended.
Why do you believe you deserve the salary increase?
How many people using facebook in San Francisco at 2:30pm on a Friday?
How would you determine the number of baggage processed on any given day?
binary tree successor
Describe a data structure of your choice. (I chose a hash table) Followed up with questions about collision, Big O time of various operations.
Write a function to convert a collection of strings into a single string and a function to convert it back.
Given a bitmap of open and closed cells, where you can traverse through open cells but not closed ones and a set of origin points on the bitmap, write a program to find the shortest path to every reachable open cell from any of the origin points.
Design something.
Linux admin
Find the largest 100 numbers out of a list of a trillion unsorted numbers
some puzzle questions.
Why would you like to work for google?
how would you validate an xml?
you have a file which contains no. from 100 to 999999999, but some nos. are missing. how would you find the missing nos.?
– loading the whole file or keeping the file open for long time isn’t desirable.
u have a thick client application i.e. swings. two users are working on the app. one of them wants to update name field where as the other one wants to update company name.until the users are trying to update different field , they should be allowed to do that . when both are trying to modify the same field, one of them should be notified and the updated value should appear.
(they asked that we keep the interview questions confidential, and I will respect that)
Would you prefer to have new products through innovation or focus on your current main products? Please provide me some examples from your prior experiences to answer this question.
what was your GPA in College?
How many people do you think Google screens every week ?
How many people do you think in year?
The Boss needs you to pre-screen 20 people a day, you know that it takes15mins to schedule and appointment, 30 mins to complete and assessment, and 15-30 mins to complete a follow up.
Knowing this what would be your strategy to complete this tasks, and would there be any time left over?
size of google graph
challenges in growing a team
Implement a stack that pops out the most frequently added item.
What role do you think you would be best in?
algorithm
Write a function to perform incremental search
Multitask
What do you consider your technical area of expertise?
How do you make sure you are delivering quality in your product or service?
Write a function to caculate the angle between hour and minute hand on a clock.
Given an unsorted array of integers, find first two numbers in the array that equal a given sum.
Provide a parser for a given regular language.
Describe Adwords to a 4th grader in three sentences or less
How have you resolved a situation with a bad teammate?
We already have a lot of really smart people here coming up with great ideas, how are you going to make a difference?
1) Code and analyse the function findMaximums().
2) Use a sorted data structure (a binary tree).
3) std::vector findMaximums(int* Data, int N, int K) where
4) Data is an array of int’s.
5) N is the size of the array Data.
6) K is the number of element from Data you want to compare and maximize.
7) The vector you return is the list of these “local maximums”.
Subset of all sets using bit arithematic.
Convert string to integer like atoi in C
different types of sorting
This job has extremely monotonous components. How will you deal with the monotony?
C++ versus Java.
Reverse a singly lined list.
How to add a counter to www.google.com to track the billionth user.
You have a 64bit interger counter set to 0. How long it will take to overflow the counter given that you are incrementing it at 4Ghz speed.
Comparisons of trees and hash tables.
What are the tradeoffs of using one versus another.
Quickly estimate 2^64 without using a pen/papar.
Was asked to estimate a number based on certain variables provided by the interviewer.
What exciting things are happening in the web space?
Develop an algorithm to sort prime numbers
Develop an algorithm to sort 100m books and find functional duplicates
How would you change or improve an existing Google product?
What would you do to double the revenue for an existing Google product in the next 12 months?
Name a site you like. Why do you like it. How would you improve it?
Most of the time was spent on questions asking you to consider a hypothetical problem and design a system to meet it.
merge sort
Describe your overall OD experience? Site specific examples of how you implemented new processes and convinced senior leadership to back them.
some bit manipulation question
B tree
Computing average power in last 5 minutes
How many golf balls could fill this room
What Larry Page should be concerned about, in term of the company strategy?
What’s the latest news about Google that you’ve read about?
what’s your current position/job?
Given a sorted array of integers, write a function to remove any duplicates. Give algorithm, then code and finally list how you would test your program.
Write a program to find depth of binary search tree without using recursion
In a sorted array, find the number closest to a given number
Serialize an array of integers in an arbitrary way. Imagine a 4×4 grid where the cells are visited in a snakelike pattern.
Please describe your leadership skills.
How many gas stations are there in the UK?
Describe UDP.
How would you troubleshoot a computer that cannot access an external website?
How much would a local handyman (with a local business and a 1-2 man operation) be willing to pay for Adwords?
List all Java classes
Design the friend suggestion of facebook, write a code, complexity,…
reverse a sentence such that the ordering of words is reversed but the words aren’t changed
-If you projected a $500M expense and the variance came in at $1M, what are some of the explanations for why that is happening? (Be prepared to give more than 3 scenarios).
-If operating margin decreased from a year before, name some reasons why this could be happening.
If you were the CFO of the company, which products are you most excited about and why?
bacteria multiply 2x a day, and on the 50th day, there are 100 bacteria, how many were here on the 48th day.
How do you debug a faulty script
What would you do to help us achieve our goals?
You are given an function which converts a string like “I work at Google” to “Google at work I”. Write all the test cases you can think of for testing such a function.
You are given a random binary tree
5
/ \
4 9
/ \ / \
3 5 6 8

Write code to print it out in order level ie
5
4 9
3 5 6 8

The tree need not be balanced. Write all the datastructures for the tree and make sure that you print newlines after each level.

Also write test cases to test your code.

TThe interview was largely focussed on business case and how I would go about looking for java programmers.
All about algorithms mostly. They like to see how you think things through
Describe a product (Google or other) that completely blew you away when you first saw it, and explain why.
If you had an idea for a new product, how would you go about making a good business case for it within Google?
Can you draw the HW block diagram of your latest project and explain ?
Why do you want to work for Google?
Technical questions on various languages, algorithms, and technologies.
Tell me about your experience and all of that.
How would I develop a product
I was asked not to explicitly talk about the interview questions, but they involved live coding into a google doc and discussing the big O complexity of the algorithms used.
Where do you see yourself in five years? (followed by the interviewer complaining about how he hated asking that question)
Write a function that will return the second longest string in a list of strings. You have to do a single pass on the list.
Please design a iterator class.
What are your best skills as a programmer?
Describe a technical problem that you solved.
How many dogs are in the US?
How many cans of paint would it take to cover an entire 747?
How much would it cost to wash all of the windows in NYC?
You run a web site which has lots of user submitted content. How would you monetize that?
Describe what happens when a user clicks a link in a browser.
You are to design a loyal to programme for an airline. What steps would you take?
Write a semaphore with spin-lock capability
Describe your previous startup ideas
solve world hunger
questions about tree and hash table
How would you handle a new client coming to you and requesting a $1M campaign go live in 3 days, but it takes 5 days for normal turnaround?
How do you make 4 gallons from a 3 and 5 gallon jug?
If you have a 3 gallon jug and 5 gallon jug, how do you measure 4 gallons?
Data Structure and Algorithm related questions.
A BST question.
A string manipulation question.
A simple BigData question.
BFS, DFS, and interval trees
OS and compiler-related stuff.
How does the garbage collector in the JVM work and how does it reclaim orphaned objects?
Explain pointer arithmetic
What guarantees does the synchronized keyword give when used on a method? When a thread calls the synchronized method, can another thread call a method that isn’t synchronized on the same object?
How to conduct a controlled experiment for improving a potential new feature in youtube – movie preview by showing 5 frames next to title. Problem – how to select the most relevant 5 frames?
How would you help the cyberattacks in china?
Design Google news.
Design an RPC protocol.
One of the question was encoding/decoding of BST problem which I haven’t seen any other web interview web sites. I don’t even remember other questions since I was extremely stressed out in the phone interviews since one of the two interviewers was quite aggressive. But the other interviewer was much better. They already know all the recent interview questions posted on the web sites, and do not ask such questions.
How many cars are registered in [the city where you live]?
What is the daily revenue for a [fruit smoothie selling] location?
What subclasses of Collection do you know
Why Google/ Why adwords? How does adwords work?
How would you improve ___Google product?
Wanted to know how to implement a traceroute routine and what ICMP and TCP details would need to be developed to write the command.
Wanted to have me explain a number of different sorting algorithms that I believe are only used in file systems. The interviewer could not explain what the question was and would not clarify what he was looking for. Total failure to deliver the interview question in a way that a computer scientist could understand what was needing to be answered.
How many airplanes are flying over the US right now?
Tell me about a time when you didn’t complete a task.
Not allowed to disclose by NDA.
What is the best way to distribute accounts to your account managers?
What is Young’s modulus?
Estimate the number of spark plugs in the state of California.
They made me promise not to tell. There were questions about thread-safety, computational complexity, and dynamic programming. Also other questions.
Academic-based theoretical questions about some technologies.
print binary tree in level order
If you were asked to find out how many people are online right now in London, how would you do it?
code game of life
describe the issues involved in moving a database from one platform to another. assume very high transaction volume. how would you do this without disrupting applications modifying data or degrading system performance.
Why do you want to work for Google in China?
Given a list of integers, find 3 numbers that add up to a given number. ie, find a,b,c,d such that a+b+c=d
List out all the data structures you know
Given a bunch of N random points in space, how would you draw a line such that N/2 of them were to the left of the line and N/2 to the right of it. Complexity
Interviewer 2. How would you generate a stream of random numbers? Optimize for space.
related to data structures and design questions
How to design a customer satisfaction survey?
Detailed packed trace and what does the final host send in terms of ICMP message.
how do you solve business problems by collaborating with co-workers?
How is your Python or Java skills?
How would you evaluate a carbon offset?
What is appealing to you about the position?
What type of binding is used in C++. Is the only type used ?
Cannot list due to NDA.
Interviewer ask me to solve some permutation related problems.
1) Algorithm to get Index of a permutation when all permutations arranged in lexicographical order and its complexity
How have you improved training and quality within a call center?
Did I enjoy my experience at my university?
Google asks interviewees to not share specific details on interview questions. They were coding-oriented questions. They required a varied set of algorithms and data structures to solve, especially including graphs, heaps, linked lists, and hash tables. Sorting algorithms were also emphasized. Some of the interview questions were quite unique, but could be abstracted in neat ways.

Google does provide a significant amount of material before the interview(s) to help you study, including links to reading material and the types of questions you can expect.

They were relatively difficult, but the interviewers were helpful.

What kind of analyses would you conduct for a business problem like this?
sort integer array in linear time
How would you work with an advertiser who was not seeing the benefits of the AdWords relationship due to poor conversions?
Name some google product you like? How will you improve it?
size the digital advertizing market? At what rate is the photo upload traffic on facebook growing per year?
Given a base 10 number, print the hexidecimal (base 16) representation of that number.
Given a list of generic items, describe/code the approach would you take to finding the most common item.
Given a list of integers of at least length 7, print the average of each consecutive 7 number long subsequence (sliding window).
Discuss and implementation of flattening a binary search tree into string representations.
Describe a method to sift through dozens of emails and rank them based on ‘importance’.
Do you know Newton’s Method? Can you write down the formula for that? I just don’t prepare in such question so I can’t remember the exact formula.
Way back years ago, I was asked to implement the NP-hard 3-set algorithm on the spot.
Why Google?
How many college students are there in the United States?
On line white board coding so that the interviewer can also see as you code.
Why Google and this position
Marketing sizing – how many people check g-mail per day
Ref to the game, Boggle, given a 3×3 grid of letters represented as a char array, generate all possible word combinations. The legal character sequences are horizontally or vertically adjacent chars. So in [A, B, C; D, E, F; G, H, I], ABCFI is legal but DFH is illegal.
Write a function that checks for valid unicode byte sequence. A unicode sequence is encoded as:
– first byte contains number of subsequent bytes ‘1111000’ means 4 subsequent data bytes
– data bytes start with a ’10xxxxxx’
Design me a File System in high level design.
Write down the algorithm of a Inorder Tree Traversal.
Similar to phone interviews but you have to better explain your solutions.
What is the difference between luminance and illuminance?
What happens when you change the size of the slits in Young’s double slit experiment? What happens if you move them closer or further apart? What happens if you have 3 or 5 slits instead of just 2 slits?
When ‘top’ command shows 30% of CPU time, what does this mean? How to write a program to use only 30% of CPU at all time?
How do you find the cube root of a number?
Pick your favorite gadget or piece of technology. How would you market that product now?
Question related to Fibonacci series
Question related to merging two arrays
What problem you may run into if you want to send one file from one place to another through the internet.
what is your favorite google product, and why?
How would you explain Adwords to an 8 year-old?
Tell me something that’s not on your resume
Explain to me something that I don’t know
Design a community out-reach program.
What’s you GPA
Given two binary search trees, write function which tells if two such trees are the same – (i.e. same info in the nodes, same branching to left and right at every node).
Given two large files with 64-bit integers produce file with integers which are present in both files and estimate O(?) complexity of your algorithm.
How to find a median in a large file of 64-bit integers
Input is a 4×4 table with letters. One starts from any of the 16 elements and can move in one step to any of the 8 neighboring cells not visited before (up, down, left, right, up-left, etc, no hyperspace jumps between rows 1 & 4, columns 1 & 4).
Every time step is made letter in that cell is added so a word is built as we walk. These generated words are looked up in external dictionary (function to look up in the dictionary is provided, I did not understand significance of this dictionary well) and the goal of the exercise is to output all words generated by all possible table walks and which are contained in the dictionary.
When you are doing “read()” call what it happening under the hood in user space?
You have two programs, A and B. Each of them takes 1 minute to run separately on a Linux machine, when run on a freshly booted system. What can you tell me about the two programs if:
a) when run together, they take 2 minutes to run
b) when run together, they take 1 minute to run
c) when run together, they take 30 seconds to run
Main problem you’ve had and how you solved it?
Explain the development process you would take and give an example.
How many smartphones are in New York City?
Tell me about a time….
What is the number of SMEs in your city, and country?
Tell me about a situation you leaded succesfully
Describe what happens when making a google search, specifically with client and server.
Serialize and deserialize a collection of strings into a single one.
Write a function to validate a binary search tree.
Find the common numbers in two text files.
What Google would do to make investments?
How google would compete with Facebook?
You are planning an offsite for 100 outstanding Google employees. Your budget is 50K. Describe the plan and compose an email that would be sent to the invitees.
What if you were planning a holiday party for 700 employees, and a week before the party another team cancels their party and now you’re in charge of hosting 1400 employees, how would you handle the situation.
Calculate the size of the server you will buy if you were to implement GMail in 2004.
Come up with the algorithm to maximize the revenue for GoogleAd… (can’t clearly remember)
What do you think are the steps and the timeline for deploying Google Apps at a large organization.
How many lines of computer code have you written in your lifetime ?
tell about the problems faced while doing the projects in past?
Imagine you are creating a program that can handle multiple requests at a time and respond to them as they come. Define run time, classes, and methods.
What clubs did you run in college?
What type of charity work have you done?
right a program- isBinarySearchTree
data structure questions around graphs and trees but straight forward ones.
Write a function that computes the intersection of two arrays. The arrays are sorted. Then, what if one array is really larger than the other array?
Why the manhole cover is round?
operating system related question
print out the powset of a set. use any programming language you want.
As per the NDA, applicants have to agree not to reveal questions. However, interviewers will progress rapidly through questions until they find one you don’t know, so prepping answers won’t help. Frankly, algorithm trivia is a dumb way to pick employees.
It felt like a stress interview. The interviewer sounded pissed from the start and seemed like he was in no mood for the interview. He called me up and the first thing he said was “I have a coding question for you!”. Then, he asked me to write a code for traversing a binary tree. As soon as I had given him the solution. He says that it will be all and slams the phone down. It was one of the weirdest interviews ever. I was surprised on how they were judging, because I did get the code right!!
Given a list of integer e.g. (1,2,4,5,6,7,8…)
Find a pair with a given sum.
Finding path in a grid.
Returning the n-th element of a linked list.
How did we get in touch?
Define Ajax
What Google product do you like, how to make it better ?
How many cups of coffe were sold yesterday in “your home capital city”?
How would you improve Gmail?
How do you organize your day
How would you diagnose a problem with a Mac, where it freezes at boot up.
Nothing was difficult
There is a lid and the bottle and price for them (1 set) is 1,5 Kc. How much is the bottle, if lid is twice as bottle?
How many coffe cups people drink in London per day?
Q1) How to skim through 10,000 lines of code to find out any obvious mistakes?
Q2) compare quick sort and merge sort in space?
Q3) While processing quick sort would take O(logn) space constraint, can you explain.
Q4) How to calculate Hamming distance between two integers, write code.
Note that there are two questions here
Q5) Write a code to print unique words (provided from command line), well some twists with it.
Q6) What is the purpose of thread lock (other than synchronization)?
Given a list L of n numbers. Write a function to return true if the sum of any two numbers of L equals to k; false otherwise.
Find the number of connected components in a Graph.
What motivates you?
Tell me about a situation in which the writing project did not go smoothly? How could you have improved it?
What is an inode?
What is the difference between TCP and UDP?
How to kill a process in linux?
Describe the password file?
Why this position / company?
SQL, what are the different types of table joins
How many cards are registered in a particular state in the US
Name a non-technical product that you like. Why do you like it and how would you make it better?
What is your favorite online photo sharing program? Why do you like it and how would you make it better?
Explain how a project in the Telecommunications industry is similar to the Software industry.
questions on the running time of quicksort and selection sort
In one of the questions in the interview they asked me to build a tree iterator for a binary tree
Given a list of strings return the substring representing the longest common prefix
the binary representation of 4100
Given a sorted array, find how many times a specified element appears.
Having two tree nodes, find a node that is the conman parent
Given two strings. remove the letters in order from the first string that are in the second.
Grade point average
Accomplishments and awards
what’s BST?
find if long string contains shorter one.
determine if BST is indeed BST and what’s complexity of it?
design patterns. visitors pattern.
how do you find out if there is a cycle in linked list.
If a camera manufacturer wants to advertise with Google, what should the copy of their ad be?
If Google were banned from advertising, how else should we make revenue?
How would Google implement a €20 annual subscription fee for Gmail users?
Describe Hashmap with details.
Write code for depth first search in a binary tree (iterative or recursive) and explain what’s the performance.
Write code for Fibonacci algorithm (iterative or recursive) and explain what’s the performance.
Create a function which returns the angle of the clock’s hour and minute hands.
How would you trouble shoot a web page that is not loading on a linux web server?
Tell me about a time when you were creative?
Take a very complicated task/project/job and present it in simple terms to a layman
top weaknesses
How many tries will you need to find out a heavy ball from a set of 9 balls. How can you minimize these tries.
What is Linux?
What is firefox?
explain what’s a C# enumerator, write a function to concatenate a list of enumerators and test this function
Design a class to process a matrix, and it needs to be able to return the average for the elements of arbitrary sub-rectangle inside that matrix, in constant time.
Design a class to serialize / deserialze a graph.
What would you do with a red brick…..
How many people in the UK do…..
You are in a room with 3 switches which correspond to 3 bulbs in another room and you don’t know which switch corresponds to which bulb. You can only teleport to the room with the bulbs and back once. You can NOT use any external equipment (power supplies, resistors, etc.). How do you find out which bulb corresponds to which switch?
How would you concatenate a string in Perl/Python?
A good example: “describe exactly what happens when you type ‘telnet google.com 80’ at a bash prompt, including shell interpretation, network connections”.
She wanted details of GPA and courses I had undertaken in my undergrad school. Wasn’t difficult but unexpected.
Implement B+tree.
How can you optimize the code written for B+ tree.
Behavior question about my previous project
Statistical problem about combination.
Technical problem about ordering a string according to another string.
Basic walkthrough of resume.
For a given maze, how to write a function to check if there’s a way rom the top-left grid to bottom-right grid with obstacles in the middle.
Find all (english word) substrings of a given string. (every = every, ever, very)
Design the backend for ad-words.
Design a better [SOMETHING]
How many gallons of milk do googler’s drink in a day?
How do I handle/rate dealing with clients?
Find the median of a large set of numbers distributed over several machines in a network.
Asked several questions about graph traversal. BFS and DFS.
Asked a question about set theory. Be able to efficiently compute union, intersection, etc.
Asked several questions about analyzing strings (e.g. longest common suffix).
Asked questions on anagrams.
How long would it take a Google car to photograph the entire city of San Francisco for Google map street view.
Create a Java method that clones a DAG (Directed Acyclic Graph).
Implement a queue with a limited numer of stacks.
Given a tree and leaf node, write the code to make the leaf node as root of tree.
Write the code to check if graph is bipartite or not?
Tell me about a project you saw from creation through completion.
Giving a windows size K and an array of size N, find the minimum of each window as it slides through the array.
design a cloud that sorts petabytes of numbers. Range of numbers are large. how efficient? Big O running time?
A gmail user login. How do you store the account information so that it can be retrieved fast?
Write a priority queue with three methods. Insert(E Element, int priority). E Pop(), update(E Element, int new_priority)
Write a stack that keeps track of min and max elements.
Why do you want to change your jobs?
Why Google?
Walk me through your Management experience?
What was your GPA (for all degrees obtained)?
What extracurricular activities have you engaged in (social, etc.)? What compensation expectations do you have, because there’s no point in continuing if we can’t meet your expectations?
Tell me about a project that failed.
How many people use Gmail on any given day?
how calculate traveling salesperson problem
Describe an experience in which you were a team leader.
What are you favorite Google Apps?
What are some strategies you use while sourcing candidates?
Tell me when you took one for the team
Pick one Google product and what would you improve
How would you adopt this feature for your market?
Write the code for “moving of the robot”: there is a “generator” — each time generate 1/0, when 1 the robot will move up, when 0 will go down, write the function to make the robot move up forever.
How would you handle a particularly difficult client?
Compute all the intersections of two sets of segments in a line.
Suppose you have a set objects, identified by a unique name. How do you store them so that you can retrieve them easily?
Given a set of cities, each with a given population, select randomly a city with a probability that is proportional to the population.
How do you process a set of log files if you don’t have enough memory to do it?
What is the output of the Linux uptime command? What is the meaning of load average? How is the load average affected by SMP?
Was asked how I would implement division without using division or mod operators. The answer should return in the form quotient r remainder.
Was asked to implement a Linked List insertion.
How many web searches are done within a week?
How many positions did you fill in a month?
You have a meeting with Eric Schmidt. How do you suggest we can make Google’s e-commerce more profitable?
3. what’s treemap and sortmap in Java
Design the battle ship game
Function for int2str
Tell us about yourself
Why Google?
Implement a binary tree interator class.
Btree traversal
If we have 22,000 employees, we plan to grow by 35%, and are going to lose about 10% due to termination during the year, how many employees do we have to hire this year?
How to measure the hight of the building using Barometer
25 horses, 5 race tracks. How many races you have to run to select top 5 horses.
What’s your dream?
Describe the best boss you ever had
Count bi-grams in a huge collection of documents grouped by source web site.
can you tell me about yourself?
tell me about a non-google product that you use and 3 features you think that’s designed well and 3 things that are not designed well
assuming you are the owner of a user review website, such as Yelp. How do you design a button that returns a list of recommended restaurants that you like.
how do you measure the success of this product
you are on a biz trip and travelling from one city to another. you have a stack of unsorted flight boarding passes. only departure city and destination city are on the boarding pass. how do you find the first departure city and your final destination city
How are you ?
Give marketing strategy for a product
If you worked on a support team and your boss wanted you to find a way to reduced support tickets %10 by each quarter, how would you go about doing that?
Is HTTP stateless?
Name three adjectives that describe you.
Given a large unsorted text file containing thousands of words count the number of times each word appears.
Can you identify a project where you had to overcome a technical challenge?
What would you say are the minimal requirements needed to successfully manage a software development project?
How would you communicate to the team when a major change was required of a project that was already underway.
brain teaser involving complex math
how to improve product of your choice
What do you plan to do after college?
How will you assign ACLs to users or groups? Theoritical discussion no code required.
Which is the toughest SQL code you have ever coded?
Convert a one dimesional array of Strings containing [a,b,c, d,e …z] to 2 dimensional array of a2[aa,bb,cc]
Why do you want to work for google?
How would you calculate the number of gas stations needed in the US?
what kind of factors would you consider when implementing software in areas of the world with limited access to internet
data structure and coding
List all of the company’s products that you use, and tell us how you use them.
Perform binary search on a sorted array, of which you don’t know the size.
Implement a fast exponentiation function
You are climbing a stair case. Each time you can either make 1 step or 2 steps. The staircase has n steps. In how many distinct ways can you climb the staircase ?
How would you go about testing a distributed system such as Gmail, before releasing it to the public. How would you simulate realistic server load ?
How would you desgin facebook, use the data struct to show the social network and find out the people that close to you but your relation are stranger (white board coding)
We have m slots for ads and n ads, each ads will have different revenue on differnet slot, design an algorithm to find out the best fit (find m ads in n ads and order them so that they can make max money, white board coding) .
Walk me down the process for selecting and implementing certain reporting features that our ad customers request.
Find the next larger node and write down code
Check whether the string is symmetric, how to test your result
How would you explain something to someone that has no idea about it?
Now, how would you explain it to a third grader?
Why did you Pick C++ instead of any other dynamic languages out there?
Find the rectangle of maximal area under a histogram
Given an array, and another key, find two numbers in the array that add upto the key.
Describe a situation where a client threatened to end their relationship with a company that you worked for and how you handled it.
* Given an array of numbers. Create another array that contains
* the product of all the members in the array except the current
* element. For example, if you have an array of 3 elements such as:
*
* A[0] = 2
* A[1] = 4
* A[2] = 6
*
* Then the resulting array will be
* B[0] = 24
* B[1] = 12
* B[2] = 8
*
Given a project deadline, limited resources, how would you complete the project successfully?
What previous sales experience do you have?
What Google program do you use most often?
Describe your work – experience? A job situation you could manage or couldnt handle
why google. describe yr short term and long term career goals
Search smallest value from a tree. What if you have enough memory, how to improve the speed?
There are two arrays A1 and A2. Find out the pairs of numbers in A2 which were in reverse order in A1.

For ex.
A1 = 2 6 5 8 1 3
A2 = 1 2 3 4 5 6

Answer:
1 & 2
1 & 3
5 & 6

Write a program to find (x^y) % z
How to find median and insert the BCT? and the complexity of each algorithm.
How to decide the size of a array and what to do if oversize? who to sort and find median?
How would you find the power set of a set of numbers? Code it.
Given a word that consists of two words such as “aman” give all the combination of valid two words. You are given a dictionary to test against.

Example: aman–> a man, am an. watermelon–> water melon

the questions were not that difficult. but i went back four times and met with one (maybe two) person each time and the questions were nearly the same. that was frustrating even though i was happy to meet more people.
How would you explain Google Apps to a 4 year old?
How does e-mail work?
Make an algorithm that, having N cards in N+1 slots (one slot empty), reach a final configuration (given initial one), showing all the steps. A move is valid only if it is moving one card from to the empty spot (letting the card’s place now empty).
The interviewer tried to suggest a release model which pointed towards the waterfall model but what he expected was that you should say that the waterfall model is not a good one.
How many golf balls fit into the airplane?
You have 3 switches on the ground floor. For each switch there is a light bulb on the upper floor (in random order). You can switch the switches as long as you need or want, but you have to determine which switch is for which bulb. And you can go to the upper floor to check only once. How do you find out it?
why do you want to be in marketing and sales
why are you a fit for google
Phone Interview:
i) Find the number of inversions in an array (describe & code)
ii) Find collinear points in a given set of 2D points (describe & code)
Onsite:
Can’t reveal the questions – signed NDA.
The questions consisted of algorithm design, implementation. Designing solution to large problems and speaking them out/writing them out.
Interviewers were nice. I was not good enough 🙂
How much ways is it possible to use to go on the top of stairs with n stairs if we can go up by 1 or 2 steps?
How to manage to keep all operations (+ min) in a stack in O(1) and prove it!
Compress a given string.
Input: aaaaabbccc
Output: a5b2c3
Design the Twitter.
What do you think would be the part of the job that you think you might like the least?
Estimate how much it would cost to put wifi in San Fran.
write a string splitting function that did not copy the string
How to build a distributed algorithm to compute the balance of the parathenses?
How would you sell a custom-made bicycle for girls 6-10 years old.
What am I thinking?
Bitwise shift right cyclic
Execute command on linux cluster
Check two leafs of graph connected or not, how we can optimize algo
Please list all of Google’s products
Implement a class representing a shared resource which can be read by up to N readers or written by only one writer at the same time.
Given a number N and a very large file containing natural numbers, find the N minimum numbers in this file.
How would you explain cloud computing to a nine year old?
From your resume, it seems that you have had a fair amount of international experience. Why do you want this kind of position?
Tell me everything you know about TCP/IP ? Ports ? Protocols ?
What are the complexity characteristics of all the operations that you can perform on the data structures that you can think of?
How much would you charge to wash all of the windows in Seattle?
What would you improve?
Create a Java class that receives a collection of collections as parameter and provides basic iterator functions, that is next() and hasNext().
The inner structure (collection of collections) must be hidden by the external interface. The next() method must thus iterate over all the elements of all the collections, starting with the next one if the current ends.
How much revenue does Admob makes?
How many small businesses are there in Europe?
Describe a situation in which you could have a deadlock in an application with only one thread.
words are given to you in “alphabetical” order (this is not the same as the usual a, b, c, d, … order)

find that order

you have an array of stock prices. i-th element in that array represents the stock price of that day. find the buy and sell dates to maximize profit.
Take an array of numbers and replace each item with the product of all the other items in the array.
How would you sort an array of size N?
What’s the difference between abstract and interface in Java
Please walk me through this HTML code and tell me what the purpose of each line is.
What do you envision for Web 4.0?
Estimate the number of active Androids in the U.S.
How to randomly select a number with equal probability from an array with unknown size?
why you want to work for Google
Tell me about a time you had difficulty working with a group and what you did to resolve the problem.
1. Given a sorted array A[1..n] with n integers, and an integer t, find all pairs (x,y) of elements in A such that x+y is smaller than t.
2. Can we do better if we seek (x,y) for which x+y=t?
You are given a text file too large to fit in memory and 3 strings A, B, C. For each string, you have a sorted array listing the positions of the string in the file (e.g., inverted indices). Find the smallest window containing the 3 strings. Order of appearance does not matter.
What was your favorite comp. sci class?
It is a phone interview. Given a box of pencils with different colors, design an algorithm to find the duplicate pencils with the same color.
Remove a node from a singly linkedlist without knowing the head node. All you have is the node itself.
Find a sequence with max sum in an array of negative and positive real numbers.
Where do you want to see your self in 1 year
Do you know what “Peak Oil” is? Yes? good. You are the product manager of Peak Oil for Google. What do you do?
You type “Google.com” into your browser. What happens?
General stuff: e.g. what languages do you know? What is the percentage of your time that is devoted to coding
Many questions about advanced C++ language features such as solutions to the “diamond” multiple inheritance problem and how to implement a virtual constructor.
Also many questions about data structures, sorting algorithms, and program complexity (Big O).
Signed NDA, so I cannot divulge questions. Most were design and product development questions regarding Google’s current products.
How would you lay out a datacenter with 10,000 servers, and how would you monitor them
What is your greatest personal achievement?
Sort a million 32 bit integers using only 2MB of RAM
Find 3 numbers in an array adding up to a given sum S.
How would you convince a luxury brand to accept to list its products in a product search engine?
If you had a list of appointments (each appointment has a begin time, an end time, and a boolean hasConflict), how would you efficiently go through them and set the hasConflict boolean for each. You cannot assume they are sorted in any way. Keep in mind that one appointment may be very long, etc.
If there was an earthquake in your hometown, how would you design the evacuation plan?
How many gallons of paint would it take to paint 1/3 of the houses in the US?
the complexity of data structures, actual writing the sorting code on google doc.
how do you check current directory listing when system is ran out of process table?
what is difference between fork and exec
What steps would you take to determine the source of a slow web site?
What was a challenging search assignment you conducted, and the result?
What are the issues with floating point calculation? For example, 1.0f + e-30, is there any issue with the statement.
How do you find the median of a set of numbers?
Design a system to analyze huge log files
What would you do if you would find yourself in a situation when your job related goals were contrary to the goals of your colleagues.
What is according to you the biggest problem that Google might be facing.
language skills
How would you restore /etc/passwd on a machine with a corrupt root disk which is only barely functioning. You have a shell and most unix shell commands, but no text editors.
How would you sort a file which is too large to fit in memory.
How many people apply to Google per year?
How do your values mesh with Google’s?
Explain how a debugger works
Write pseudo code for a Binary Search tree
Find the least common root for 2 numbers in a BST
How would you adjust our recruiting process?
explain the difference between object oriented programming and regular programming to a 5 year old kid (This question for a risk analyst position)
Tell me a time you were in an ethically questionable situation and how did you deal with it?
How to find the top k items from n distributed servers, with min network communication, but computation local at servers is ok
How would you sort an array of one billions integers?
Why do you want to work here?
Very technical Java concurrency question that required a LOT of knowledge of concurrency in Java.
How does the BDR get elected in OSPF?
Explain how a Juniper router selects the best path (BGP)
write a program to do carry out one of your favorite sorting algorithms
Given a directory with lots of files, find the files that have the same content (the file names are different).

I think file format is not considered, since when I said the size of the file with the same content should be the same, the interviewer did not deny it.

You’re given a string, and you want to split it into as few strings as possible such that each string is a palindrome.
write code to find the second shortest path between two given nodes in an undirected graph.
Partition an array in such way zeros to be moved on the left side of the array, other numbers on the right side of the array. Extra storage not allowed, only in-place.
Should Google buy NetFlix?
What blogs do you read?
This is not a question from the day but gives you an idea of what to expect.

Given an array of numbers and another number, work out whether the array of numbers can be manipulated using standard mathematical techniques to equal the other number given. e.g. given 5 and 10, can you make 50? 5 * 10 = 50, so yes.

How does an ethernet switch route?
How would you sort an array of one millions integers?
your previous projects
Give me an example when you took initiative?
Find the integer pairs in an integer array, so that they sum up to a specific number n.
Write code to check the validity of a suduko square
Questions related to data stuctures and algorithms.
An ambiguous design problem for which they expect the interviewee to fill-in/assume various parameters.
Give the sizeof of the following struct :

struct{
char a,b;
int c;
}

Write a C procedure to reverse a string in-place.
Someone can go up on stairs from one or two steps, how many different there is to go up on a stairs with n steps.
What are the argument of the main function in C.
How to delete the file “-f” with rm.
Print all shortest paths in a grid (Cartesian), given the starting and the ending point.
Describe the TCP handshake and some questions regarding low level TCP/IP protocol details.
Write a regular expression to match a machine’s MAC address
Write an algorithm to test if n is power of 2
Given 2 numbers x and y, check if x is an integer power of y. For instance, x = 8, y = 2 would return true and x = 10 and y = 2 would return false since the first one is an integer power but the second isn’t.
(Without telling you the specific question,) estimate how many bits should I use for the hash key in your solution? Justify!
Mostly PM questions (How would you design…), not just software-related but also every day products. Some guesstimates and brainteasers. Signed NDA so cannot reveal actual questions (if you google “google interview questions”, you’ll ge a pretty good impression of the kind of questions they ask).
Given a set of shapes in 2D space, and a coordinate pair, write a routine that returns true if any of the shapes overlap the coordinate pair.
You have many competing demands and will not be able to achieve them all in one day, however all the deadlines are for today. How do you choose which ones to do?
The software program is not meeting expectations in terms of timescales or functionality. What steps would you take to bring the program back into line.
How would you deal with personality clashes among team members?
Most questions were the typical, contrived algorithm problems, but a couple were more open-ended design questions. There was one problem that involved graphs. After giving a solution, they’ll ask what the asymptotic complexity is, and how that can be improved. I was also asked what test cases I would write against the solution.
When did you graduate from college?
What was your grade point average?
How do you run a test of 1 million sample data?
What do think about the distribution model of Google Android to date?
What would you change or improve about Google AdWords?
Specific details of examples of general phrases in my resume.
Given a dictionary of words, decrypt it using a given decrypt() function
Write mergesort
Please describle your resume.
An example questions was:
If you had a days worth of queries, how would you sort the queries by the letter q, and then return a sufficiently random sample of 1000 queries. How do you ensure randomness?
There were no trick questions and I don’t recall any particularly difficult questions. Given the number of interviews and people involved in the process, you can’t really prepare.
I was asked a fairly involved Objective C question.
What is the angle created between the minute and hour hands on a clock that reads 4:20?
How many applications does Google receive in a day?
Reverse an sequence, or array
Design an algorithm, which can record the largest number in an ever-upgrading sequence.
Implement Binary Search
What professional organizations are you a member of? How can they contribute to your performance in this position?
Given an array of numbers, replace each number with the product of all the
numbers in the array except the number itself *without* using division.
How to select a random sample of size K from a stream of numbers.
Design a better toothpaste tube
Design a compression algorithm
What Google products do you like? How would you make one of them better?
What Non-Google products do you like? How you would make one of them better?
How would you make Web browsing faster?
A database table with no primary key, and you have two rows with exactly same data; now you want to delete one row; how you going to make sure it is deleting the second one not the first one or vice versa?
what is DMA
design back end for gmail
Different ways of implementing
Find missing number in sum
What were your SAT scores?
Why am I meeting you?
How do you know two proportions from the same population for answers to the same question are significantly different?
The key thing was understanding how the java garbage collector worked.
What happens when I type “ps” into a UNIX prompt?
How does RAID work?
when will 2hands of a clock point to the same position, C++, python
Given a file with a set of file names, write shell script to rename all these files.
No technical questions were asked.
What Google product do you like, and why?
Why are you a good fit for google?
What happens when you enter a search query on google ? ideas about sorting results ?
How to choose pivot in quicksort
Tell me how you would figure out the number of Kilo-watt-hours would be required to boil a container of water.
How to efficiently sort a pivoted array
Can you explain why Google should hire you?
Reverse a linked list in place
Describe a concept how you can fixe the issue ABC within DNS?
You have a strong background in XYZ. We do not need this. We need knowledge in ABC. Why do you apply for the job?
How many cans of blue paint were sold in the United States last year?
How will you determine two graphs are the same?
What happens when you enter a URL in a browser? How does a DNS system work?
What product in the market place to you thing is well marketed and positioned?
How would you solve XXX problem (have to jump up to the whiteboard and think through it on the fly)
how would you code the Fibonacci numbers in javascript
Why do you want to work for Google.
Can you explain Google AdWords to me?
What do you think the position you’re applying for is about?
some general OS questions and C++ question
Linked list and tree questions
write a program to count the number of 1 digits in a number’s binary representation.
Why do you apply at Google without knowing anything about search?
if you do a configuration on CNAME (part of the postini service) does it matter if use capital or small letters?
What is the strategy pattern in Java?
Something about reading a file of extreme size a chunk at a time, and search for the occurrence of a string in it. The focus was on describing the algorithm and data structures used.
Differences between two programming languages appearing in your CV (the interviewer chooses which ones)
How do you get a new product into a market
What are some existing threats to Google’s business, and how can they be approached.
Describe your past work experiences.
Describe the differences you have experienced between the management of different Asian companies
confidence interval
Given a search terms, find the minimum window containing all the words
There are n pots with different # gold coins in them. Two players play a game, where each player can select a pot at either ends. maximize the gold
Reverse the bits in a 32 bit integer. Write C code for that.
Non programming. The mouse in the maze problem. Shortest paths to reach outside.
Given a web system which gets disconnected, how would you debug it. Also where would you add resources to maximise throughput given some constraints.
Given a statement which took an integer, incremented it by 1 and then branched to another location which you provide, implement addition of two numbers multiplication, etc using just that statement (or command).
Why are there two high tides in one day?
Implement a program to play the battleship game.
Given a grid that contains rectangles, write a function that will return all the rectangles that overlap with each other.
How would you test Goggle maps?
How would you compress a string of characters by hand, not using zip. To reduce size.
What kind of metrics did they use to measure your performance in your previous job?
How do you deal with conflicts?
Describe in detail sourcing methods you’ve used.
Typical IT questions
I really don’t want to confuse you people with the hard questions. Questions were ok if you know the basis and do programming on day to day basis then it’s fine.
What is the worst-case complexity of mergesort?
No particularly difficult questions.
What are some of the biggest opportunities to grow this area?
Initial Question
Write a function in your language of choice to check if a given string matches a given pattern as a non-contiguous substring: that is, all the characters in the pattern appear in the text string in the same order, but possibly not all in a row.

(eg: pwdp matches passwordparser.h and pwdafterpepper.cc)

Continuation:
How can this be made more efficient (so as you add to the search string, you don’t have to redo the whole problem)?

Continuation 2:
How could results be sorted by relevance?

Write a function to return if a number is a palindrome (eg, 113848311)
Write a function to return the number with the longest collatz sequence in a given range: int longestCollatz(int lower, int upper);
How would you implement Google spelling correction algorithms?
why does interrupt need to turned off before taking spin lock
Reverse the word order in a string.
Suppose you have an arbitrarily connected graph with n nodes. Come up with an algorithm to identify each set of connected nodes (i.e. identify all the islands in the graph). What’s the complexity? Can you find a solution in O(n log n)?
Suppose the Europe operations suddenly lose 20% in terms of revenue, how could you find out what’s going on, and what do you want to do to handle the situation?
Why do you apply for Google?
What is the Google product you like the most
Sort the entries in database in single pass?
Write a quicksort function.
Describe Bresenham’s algorithm
What do you know about Google?
Reverse bits of a digit
Implement a calendar system that identifies conflicts
You have all of the prices for a given stock for the next year. You can buy once and sell once in that year. How do you determine when to buy and sell to maximize your profit?
Estimate the number of cars in the metro area?
How would you prioritize incoming tasks?
Why gifting is important in a social game?
what else is important in a social game?
how trace route works
how ping works
What are the three most frustrated working experience at current job?
I was asked questions in the areas of data structures, graphs, and architectures.
nothing in particular- this was just a phone interview.
Where do you see yourself in 5 years?
How does google make money?
What was google’s revenue in 2009
Standard questions like: why did you decide to send your CV, tell more about yourself etc.
How would you write a program to detect memory segmentation faults?
Write an algorithm to sort and merge 2 LARGE data streams on a system where storage is essentially unlimited (but slow) and RAM is limited.
what’s wrong with the following code :