Google Question Paper - GLAT (GOOGLE LABS Aptitude Test)

Google Question Paper - GLAT (GOOGLE LABS Aptitude Test)

1. Solve this cryptic equation, realizing of course that values for M
and E could be interchanged. No leading zeros are allowed.

WWWDOT - GOOGLE = DOTCOM

This can be solved through systematic application of logic. For
example, cannot be equal to 0, since . That would make , but , which
is not possible.

Here is a slow brute-force method of solution that takes a few minutes
on a relatively fast machine:

This gives the two solutions

777589 - 188106 == 589483
777589 - 188103 == 589486

Here is another solution using Mathematica's Reduce command:

A faster (but slightly more obscure) piece of code is the following:

Faster still using the same approach (and requiring ~300 MB of memory):

Even faster using the same approach (that does not exclude leading
zeros in the solution, but that can easily be weeded out at the end):

Here is an independent solution method that uses branch-and-prune
techniques:

And the winner for overall fastest:

2. Write a haiku describing possible methods for predicting search
traffic seasonality.

MathWorld's search engine
seemed slowed this May. Undergrads
prepping for finals.

3. 1
1 1
2 1
1 2 1 1
1 1 1 2 2 1

What's the next line?

312211. This is the "look and say" sequence in which each term after
the first describes the previous term: one 1 (11); two 1s (21); one 2
and one 1 (1211); one 1, one 2, and two 1's (111221); and so on. See
the look and say sequence entry on MathWorld for a complete write-up
and the algebraic form of a fascinating related quantity known as
Conway's constant.4. You are in a maze of twisty little passages, all alike. There is a
dusty laptop here with a weak wireless connection. There are dull,
lifeless gnomes strolling around. What dost thou do?

A) Wander aimlessly, bumping into obstacles until you are eaten by
a grue.
B) Use the laptop as a digging device to tunnel to the next level.
C) Play MPoRPG until the battery dies along with your hopes.
D) Use the computer to map the nodes of the maze and discover an
exit path.
E) Email your resume to Google, tell the lead gnome you quit and
find yourself in whole different world [sic].

In general, make a state diagram . However, this method would not
work in certain pathological cases such as, say, a fractal maze. For
an example of this and commentary, see Ed Pegg's column about state
diagrams and mazes .

5. What's broken with Unix?

Their reproductive capabilities.

How would you fix it?

[This exercise is left to the reader.]

6. On your first day at Google, you discover that your cubicle mate
wrote the textbook you used as a primary resource in your first year
of graduate school. Do you:

A) Fawn obsequiously and ask if you can have an autograph.
B) Sit perfectly still and use only soft keystrokes to avoid
disturbing her concentration
C) Leave her daily offerings of granola and English toffee from the
food bins.
D) Quote your favorite formula from the textbook and explain how
it's now your mantra.
E) Show her how example 17b could have been solved with 34 fewer
lines of code.

[This exercise is left to the reader.]

7. Which of the following expresses Google's over-arching philosophy?

A) "I'm feeling lucky"
B) "Don't be evil"
C) "Oh, I already fixed that"
D) "You should never be more than 50 feet from food"
E) All of the above

[This exercise is left to the reader.]

8. How many different ways can you color an icosahedron with one of
three colors on each face?

For an asymmetric 20-sided solid, there are possible 3-colorings .
For a symmetric 20-sided object, the Polya enumeration theorem can be
used to obtain the number of distinct colorings. Here is a concise
Mathematica implementation:

What colors would you choose?

[This exercise is left to the reader.]

9. This space left intentionally blank. Please fill it with something
that improves upon emptiness.

For nearly 10,000 images of mathematical functions, see The Wolfram
Functions Site visualization gallery .

10. On an infinite, two-dimensional, rectangular lattice of 1-ohm
resistors, what is the resistance between two nodes that are a
knight's move away?

This problem is discussed in J. Cserti's 1999 arXiv preprint . It is
also discussed in The Mathematica GuideBook for Symbolics, the
forthcoming fourth volume in Michael Trott's GuideBook series, the
first two of which were published just last week by Springer-Verlag.
The contents for all four GuideBooks, including the two not yet
published, are available on the DVD distributed with the first two
GuideBooks.

11. It's 2PM on a sunny Sunday afternoon in the Bay Area. You're
minutes from the Pacific Ocean, redwood forest hiking trails and world
class cultural attractions. What do you do?

[This exercise is left to the reader.]

12. In your opinion, what is the most beautiful math equation ever
derived?

There are obviously many candidates. The following list gives ten of
the authors' favorites:

1. Archimedes' recurrence formula : , , ,
2. Euler formula :
3. Euler-Mascheroni constant :
4. Riemann hypothesis: and implies
5. Gaussian integral :
6. Ramanujan's prime product formula:
7. Zeta-regularized product :
8. Mandelbrot set recursion:
9. BBP formula :
10. Cauchy integral formula:

An excellent paper discussing the most beautiful equations in physics
is Daniel Z. Freedman's " Some beautiful equations of mathematical
physics ." Note that the physics view on beauty in equations is less
uniform than the mathematical one. To quote the
not-necessarily-standard view of theoretical physicist P.A.M. Dirac,
"It is more important to have beauty in one's equations than to have
them fit experiment."

13. Which of the following is NOT an actual interest group formed by
Google employees?

A. Women's basketball
B. Buffy fans
C. Cricketeers
D. Nobel winners
E. Wine club

[This exercise is left to the reader.]

14. What will be the next great improvement in search technology?

Semantic searching of mathematical formulas. See
http://functions.wolfram.com/About/ourvision.html for work currently
underway at Wolfram Research that will be made available in the near
future.

15. What is the optimal size of a project team, above which additional
members do not contribute productivity equivalent to the percentage
increase in the staff size?

A) 1
B) 3
C) 5
D) 11
E) 24

[This exercise is left to the reader.]

16. Given a triangle ABC, how would you use only a compass and
straight edge to find a point P such that triangles ABP, ACP and BCP
have equal perimeters? (Assume that ABC is constructed so that a
solution does exist.)

This is the isoperimetric point , which is at the center of the larger
Soddy circle. It is related to Apollonius' problem . The three tangent
circles are easy to construct: The circle around has diameter , which
gives the other two circles. A summary of compass and straightedge
constructions for the outer Soddy circle can be found in " Apollonius'
Problem: A Study of Solutions and Their Connections" by David Gisch
and Jason M. Ribando.

17. Consider a function which, for a given whole number n, returns the
number of ones required when writing out all numbers between 0 and n.
For example, f(13)=6. Notice that f(1)=1. What is the next largest
n such that f(n)=n?

The following Mathematica code computes the difference between [the
cumulative number of 1s in the positive integers up to n] and [the
value of n itself] as n ranges from 1 to 500,000:

The solution to the problem is then the first position greater than
the first at which data equals 0:

which are the first few terms of sequence A014778 in the On-Line
Encyclopedia of Integer Sequences.

Checking by hand confirms that the numbers from 1 to 199981 contain a
total of 199981 1s:

18. What is the coolest hack you've ever written?

While there is no "correct" answer, a nice hack for solving the first
problem in the SIAM hundred-dollar, hundred-digit challenge can be
achieved by converting the limit into the strongly divergent series:

and then using Mathematica's numerical function SequenceLimit to
trivially get the correct answer (to six digits),

You must tweak parameters a bit or write your own sequence limit to
get all 10 digits.

[Other hacks are left to the reader.]

19. 'Tis known in refined company, that choosing K things out of N can
be done in ways as many as choosing N minus K from N: I pick K, you
the remaining.

This simply states the binomial coefficient identity .

Find though a cooler bijection, where you show a knack uncanny, of
making your choices contain all K of mine. Oh, for pedantry: let K be
no more than half N.

'Tis more problematic to disentangle semantic meaning precise from the
this paragraph of verbiage peculiar.

20. What number comes next in the sequence: 10, 9, 60, 90, 70, 66, ?

A) 96
B) 1000000000000000000000000000000000\
0000000000000000000000000000000000\
000000000000000000000000000000000
C) Either of the above
D) None of the above

This can be looked up and found to be sequence A052196 in the On-Line
Encyclopedia of Integer Sequences, which gives the largest positive
integer whose English name has n letters. For example, the first few
terms are ten, nine, sixty, ninety, seventy, sixty-six, ninety-six,
…. A more correct sequence might be ten, nine, sixty, googol,
seventy, sixty-six, ninety-six, googolplex. And also note,
incidentally, that the correct spelling of the mathematical term "
googol" differs from the name of the company that made up this
aptitude test.

The first few can be computed using the NumberName function in Eric
Weisstein's MathWorld packages:

A mathematical solution could also be found by fitting a Lagrange
interpolating polynomial to the six known terms and extrapolating:

21. In 29 words or fewer, describe what you would strive to accomplish
if you worked at Google Labs.


How tough is Google's interview process?

With Google positioning itself to be "the new Microsoft" - to be understood as gaining a place in the mind of the SEC, the media, the developer community, the business student, rivals, and prospective employees as the most popular/dominant/challenged/feared/innovative software company in all the land - it's no far reach to say that a heckuva lot of people are going to want to work there (myself included), and that opportunities will abound. One thing I remember about interviewing with Microsoft a few times was how legendary & intellectually rigorous the interview process was, all by design. I'd thus like to know in contrast how difficult Google makes it for justifying one's qualifications for varying positions.

I'm hoping against hope that Google won't develop a juxtaposed attitude about corporate recruiting - being unbelievably liberal in scouting, attracting and drawing-in talent, and then so arrogant and senselessly pointless in its interviewing process as to turn off and turn away thousands of qualified people per year because they couldn't truly "answer" the canonical quandary of "how do you design a perfect toaster?", asked my some hiring manager who poses the question not so much to fulfill commitment to Microsoft's corporate culture, but more so because she had to go through it herself.


Another Experience

A few months ago I received an e-mail from a recruiter at Google asking for an opportunity to talk to me about available development positions. Needless to say, I was pretty excited. I’m fairly happy in my current job, but–it’s GOOGLE. You don’t say no to an interview opportunity at Google.

I’m writing this account in order to contribute to the meager resources available on the Internet about the Google interview experience. I signed an NDA, so I’m not going to say what the specific questions were, but I think I can give a pretty good idea of my experience. I apologize right now for the length.

I traded a few e-mails with a recruiter in Mountain View. I had a phone conversation with him, wherein he asked me general questions about my skills, desired work locations (giving me a choice of Santa Monica, Mountain View, and Boston). I have no desire to live in California, so I chose Boston. I was then passed to another recruiter, who setup a phone interview with an engineer in Mountain View. There was a false start, when they couldn’t do the interview at the original time, so we postponed.

he phone interview went very quickly. He was very nice and asked about my specific talents, things I enjoy doing, and projects I’d worked on–especially those I listed on my resume. He asked about the ray tracer I wrote in college, since he had an interest in that. He also asked some general questions about the stuff I do for work. Then he got into the technical question. It was an interesting problem, and I asked follow-up questions, talked out loud, wrote things down in front of me (and told him what I was writing and why). I immediately thought of the naive solution–always a good place to start. He was interested in the asymptotic complexity. I knew there were better ways of doing it, so I started thinking of optimizations to the algorithm, trying to come up with ways of caching information, reusing previously-computed values, etc. He gave me some gentle prodding, and I think I understood immediately where he was going. I answered the question fairly well, I though.

And that was it–just a single question. I was surprised. The entire thing lasted less than 30 minutes. I was almost disappointed, and thought–”well, that’s that–I won’t hear back.” I really wasn’t expecting any follow-up.

The next week, I got an e-mail from my recruiter who said I had impressed and was going to get the opportunity for an in-person interview in Boston! They hooked me up to a travel coordinator, as well as the recruiter in Boston.

Very exciting. I had a convenient time to go, so I set that up, took time off from work and went up to Boston, staying in the Cambridge Marriott. Very nice hotel. 40″ flat screen TV in the room ( which I never turned on). All expenses paid for, of course. I did have to pay for hotel and food up front, and save the receipts. (And yes, I promptly received a reimbursement check from them a few weeks after I sent them in.)

I arrived on Monday afternoon, figured out Logan International (a very confusing airport, I thought), and got myself to Cambridge, in the heart of MIT, an hour or so later. I checked in, then went walking. I found the building Google is in on the very next block from the hotel. They have a floor in a building that MIT leases to startups, tech incubators, and the like. There are plenty of news articles about the Google Boston office–just…you know, Google for them.

I walked past the ultimate geek bookstore–

Discount tech books. COOL. I would definitely have to stop there later. Then I got some cheap, awful Chinese food at the food court

right under the hotel. Why? When I could go out on Google’s dime? I think I was just tired and wanted to get back to the hotel soon and start studying.

I ate dinner in the room, took pictures of the wonderful view of the Boston skyline.

Studying

What did I study? I brought two books with me: Robert Sedgewick’s Algorithms in C++, and a C++ reference manual. I went over advanced C++ topics, STL, simple sorting and searching algorithms, properties of graphs, big-O, and anything else that popped into my head.

By far the most valuable thing I did was write out algorithms before-hand. I picked something and wrote it out by hand in a notebook. It was hard going at first, but I knew it was the best thing I could do to prepare. I did selection and insertion sort in both array and list form. I did string reversal, bit reversal, bit counting, and binary search. All by hand, without looking in a book at all. As well you might know those simple algorithms, it’s harder than it sounds.

I went to bed relatively early–9:30, and woke up the next morning at about 6. I went to breakfast in the hotel restaurant, got a rather large meal, and then headed to my room to study more. I wrote more algorithms and redid some I had done the previous night.

Oh, I also wrote down in my notebook (beginning on the plane ride up) questions for Google, as well as answers to questions they could ask me (standard interview fare–projects, favorite project, languages, strengths, passions, getting along with people).

My interview was scheduled for 10 am–I checked out at 9:30 and left with my bag (I had everything in a single bag I could carry–it was very heavy) and sat in a little square for a few minutes. At about 9:50, I went in, took the elevator, and was greeted with:

.

. (ready for it?)

.

The Google

Dr. Seuss land! Yes, that was my first thought. I think the door was green, the reception area was very colorful. The receptionist was very nice and asked me to sign in on a computer, which printed a name badge for me. They had some research papers by Google employees on a wall, so I grabbed a couple (their hard drive failure study, and map/reduce). After a few minutes, my Boston recruiter came out and greeted me, offered me a drink from their free fridge, and took me to a small conference room, furnished, it appears, from Ikea. It was simple, clean, and very nice. There was a white board. I would get to know that whiteboard very well.

My first interviewer came in and we got started. I talked about my projects for a bit, they answered my questions, and then we got to the problem. Each interviewer asked me to solve a single problem (could be some sub-problems involved), and I had to do it on paper or on the board. I wrote C/C++ code. They take note of what you write and ask you further questions, especially if your first solution isn’t optimal.

I tried to take extra care with my code and not let stupid mistakes creep through. I used good variable/function names, made sure my braces matched, and I ran through the algorithm on the board once I had written it.

The first interview was one of the toughest. I was more nervous. I think I made more mistakes–I didn’t see things as quickly as I did later.

I had three interviews before lunch. They then handed me off to someone else who would not be evaluating me, but would just be an escort for lunch. The Google cafeterias in Mountain View are legendary, but the Boston office is far too small to warrant such lavishness. Instead, they have a catered lunch every day. It was wonderful. They also have all the free drinks and candy you could want, available all the time. I spent much of the time asking my escort questions about Google, what he was working on (couldn’t tell me), the area, the office, the commute. We were also joined by the head of the office, who didn’t realize I was an interviewee, and we had a nice conversation as well.

Lunch was an hour, and then I was back in the conference room. I had two more interviews. Then the recruiter came back in at about 3:15 or so and debriefed me–asked me my impressions, how I felt. I reiterated what I had told him on the phone previously, and that morning before we started: that I was trying to take this as easy and nonchalantly as possible, to have fun, and learn, and let it be a good experience. I had a job that I enjoyed, and didn’t NEED this one, but I think I would do well there and enjoy it very much. They came to me, after all.

I think by the end of the day, I was really pulling that off well. Once I got over my nervousness in the first interview, I really did have fun and enjoy it.

General Notes

They didn’t ask me any stupid questions. None of this “what’s your biggest weakness?” garbage. Not even the recruiter asked me anything like that. Nothing silly at all. They also didn’t ask me easy technical questions. They got right into the problems and the code. I had to describe an algorithm for something and write code for it. It was serious, they were all nice–I met people with serious reputations online. I felt like they were respecting me as a fellow programmer–almost. I wasn’t one of them, but they really wanted to see if I could become one of them.

I did receive prompts to get through certain problems, but not overly so. I answered every question they asked. Some I answered better than others, but the ones I didn’t get right away, I had alternate solutions, and I understood where they were going as soon as they started talking about it.

Why I didn’t get the job

Well, companies these days won’t tell you why. I think they fear it opens them up to lawsuits. I think that’s silly. It prevents those of who really do want to learn and improve from knowing what we’re deficient in. Oh well. They told me that they thought I would do well at Google, but that it wasn’t a good fit at the time, and I should apply again in the future. (Of course, I didn’t apply in the first place.)

My suspicions, however, are that I lean too much towards Microsoft technologies. I do a lot of work in .Net. That’s where more and more of my experience is. I do consider myself very good in C++, but I’m doing more and more C# work. I’ve always been a Microsoft Windows developer.

I also am not really interested in web-centric technologies, and I told them so. I’m more interested in client apps on the desktop, and server apps.

Of course, it’s very possible I just didn’t answer the questions to their satisfaction–that I needed more prompting than I should have. Oh well.

It could also be that my GPA wasn’t what they wanted. I goofed off my freshman year of undergraduate work. I really hurt my grades. I came back, though, and got straight A’s for my last few years where I took the hard CS classes. I also got straight A’s in my Master’s program while I was working full time. I don’t think this was the issue, but it’s possible.






No comments:

Post a Comment



Archive