Posted by
Admin on
9/30/2009 9:41 AM |
Comments (0)
Interviewed Apr 2009
in Dublin, County Dublin
(took 4+ weeks)
Applied online, after which it took about a month for Google to get
back to me regarding interviews. First interview with recruiter who did
a background check after which she informed me of two additional
interviews: the interviewers were from the same market; one of them wa...
[More]
Posted by
Admin on
9/29/2009 9:39 AM |
Comments (0)
I interviewed at Google for a full-time Software Engineering position after graduation.
As
I informed the recruiter that I had a pending offer already, they
skipped the initial interview and brought me in for a full-day
interview.
I met with 5 engineers: two 45 minute interviews, an hour lunch, and two more 45 minute interviews.
There
...
[More]
Tags: questions |
Posted by
Admin on
9/13/2009 11:11 AM |
Comments (0)
Question: Binary Search Tree Validity
Write a function to determine whether a given binary tree of distinct integers is a
valid binary search tree. Assume that each node contains a pointer to its left child, a
pointer to its right child, and an integer, but not a pointer to its parent. You may use
any language you like.
Good Answer: Note t...
[More]
Posted by
Admin on
9/11/2009 9:08 AM |
Comments (0)
You have five pirates, ranked from
5 to 1 in descending order. The top pirate has the right to propose how
100 gold coins should be divided among them. But the others get to vote
on his plan, and if fewer than half agree with him, he gets killed. How
should he allocate the gold in order to maximize his share but live to
enjoy it? (Hint: O...
[More]
Posted by
Admin on
9/9/2009 11:07 AM |
Comments (0)
Question: Substring
Write a program to determine whether an input string x is a substring of another
input string y. (For example, "bat" is a substring of "abate", but not of "beat".) You
may use any language you like.
Sample Answer (in C++):
bool hasSubstring(const char *str, const char *find) {
if (...
[More]
Posted by
Admin on
9/9/2009 11:01 AM |
Comments (0)
Question: Deck Shuffling
Given an array of distinct integers, give an algorithm to randomly reorder the
integers so that each possible reordering is equally likely. In other words, given a
deck of cards, how can you shuffle them such that any permutation of cards is
equally likely?
Good answer: Go through the elements in order, swapping ea...
[More]
Posted by
Admin on
9/7/2009 10:39 AM |
Comments (0)
Classic Question #4: Reversing the words in a string
Write a function to reverse the order of words in a string in place.
Answer: Reverse the string by swapping the first character with the last character,
the second character with the second‐to‐last character, and so on. Then, go through
the string looking for spaces, so that you find wher...
[More]
Posted by
Admin on
9/5/2009 10:35 AM |
Comments (0)
Classic Question #1: Coin Puzzle
You have 8 coins which are all the same weight, except for one which is slightly
heavier than the others (you don't know which coin is heavier). You also have an
old‐style balance, which allows you to weigh two piles of coins to see which one is
heavier (or if they are of equal weight). What is the fewe...
[More]