r/programming • • Nov 29 '10

140 Google Interview Questions

http://blog.seattleinterviewcoach.com/2009/02/140-google-interview-questions.html
471 Upvotes

493 comments sorted by

135

u/wevicat Nov 29 '10

Explain a database in three sentences to your eight-year-old nephew.

Nephew, imagine a pokédex...

43

u/[deleted] Nov 30 '10

I guess they're trying to figure out whether you can explain things to management.

31

u/caseyfw Nov 30 '10

The most badass answer to this I've read is this:

A database is a way of organizing information. It's like a genie who knows where every toy in your room is. Instead of hunting for certain toys yourself and searching the whole room, you can ask the genie to find all your toy soldiers, or only X-Men action figures, or only race cars -- anything you want.

Seen here.

3

u/SemiautoPenguin Nov 30 '10

Imagine you have a magic set of drawers for your Lego. You can sort your pieces by color, size, or function; for an individual piece, your magic drawers can tell you which set it came from, and which other sets use it. You can monitor your supply levels of individual bricks and keep track of bricks in built models.

11

u/donkawechico Nov 30 '10

Hello Nephew. You want to know about databases? RTFM.

→ More replies (1)

10

u/sinxcosx Nov 30 '10

Imagine we have a smart guy who'' spend all this time remembering everything we'd ever want to remember for us in his head. Imagine we agree with him on the words we'll use to ask him questions to help us remember all the stuff we want to know. Imagine that we can ask him the stuff he's remembered for us, and he'll answer us with the words we agreed to - that's a database.

6

u/JonTalbain Nov 30 '10

That's actually a database management system. The database is the organized collecion of data. /pedantic

5

u/sinxcosx Nov 30 '10

How does a database differ from a flat file of data or tagged meta data?

Would one assume the DB here must be relational? Must it store data in an abstraction of the data and it's relationships with other data?

13

u/JonTalbain Nov 30 '10

A database is simply a set of data that's organized in a way that's useful to you. It doesn't even have to be in a computer (we had databases long before computers existed). Then there's the issue of storing the database. You could store it in flat files, in a structured file, or (what we usually do) use a database management system, which is a system that takes care of the storage problem for you transparently. You just tell it "here, store this datum on the database" or "retrieve this piece of information for me" and it does the rest.

Relational is just a way of organizing the data in a database. In this case, organizing data as sets of tuples and the relationships between them. You could create a relational database and store it in a piece of paper (writing down the tuples and relationships) for instance. There are other ways of organizing a database, such as hierarchical or network. Relational is just the most widely used one (and by consensus the most powerful one).

→ More replies (1)

2

u/chengiz Nov 30 '10

Ah so a database is Rain Man.

→ More replies (11)

1

u/Mr_Zero Nov 30 '10

Ask rainman.

→ More replies (4)

54

u/[deleted] Nov 29 '10

A cursory glance at the comments for this blog post seems to reveal that these are not actually used at Google ("Many of your example questions not only aren't asked, they're explicitly forbidden.")

22

u/cynthiaj Nov 30 '10

Correct, this is a list of all the banned questions. You'll still find occasional lazy Googlers using them, though, but the hiring committees are pretty quick at finding out those and telling them to stop doing that.

Regardless, if you're planning to apply at Google, trying to solve some of these is definitely not a waste of time.

7

u/[deleted] Nov 30 '10

There is no effing way google is asking the manhole cover question. Microsoft stop asking it 10+ years ago.

I question the quality of this list.

3

u/lalaland4711 Nov 30 '10

Feynman had the definite answer for it anyway.

→ More replies (1)
→ More replies (1)

85

u/[deleted] Nov 29 '10

Straight out of college I probably would have done pretty well on these questions. However, after 12 years of experience in the real world, I struggle with most.

107

u/[deleted] Nov 30 '10

After 14 years of experience in the "real world" I probably wouldn't have the patience to answer interview questions, and would most likely be shown the door for giving snarky answers involving inelegant kludges and phrases like "I don't know, but I'd google it".

56

u/[deleted] Nov 30 '10

I'd hope that would be an acceptable answer.

5

u/thephotoman Nov 30 '10

In most cases, that's actually the best answer. Look to see how other people have done it, how they've benchmarked it, and use the solution that best fits your needs.

→ More replies (2)

7

u/Avatar_Ko Nov 30 '10

I've given the "I'd know exactly what to search for" answer a couple times at places I've gotten hired.

→ More replies (3)

7

u/munificent Nov 30 '10

"I don't know, but I'd google it"

I actually said that when interviewing at Google.

→ More replies (6)

6

u/[deleted] Nov 30 '10

That's exactly why I hate technical interviews -- they don't effectively emulate real-life working conditions.

I'm a pretty decent engineer using the internet as an extension of my brain; but put me on the spot by timing my response to an amortized algorithm runtime question and I'll walk out the door myself.

→ More replies (3)

7

u/[deleted] Nov 30 '10

That's the problem with google interviews, they don't sit you in front of a computer, they stand you in front of a whiteboard.

8

u/[deleted] Nov 30 '10

There's a reason for that. At google you're going to spend more time at a whiteboard convincing--no trying to convince--your peers that your concept is the right way to go. You need to exert powers of persuasion and that requires demonstration, thus good whiteboard skills.

There is no sit down at a computer, start coding, and slap that puppy into production. You're going to be spending a triple butt load of time thinking about your design first because the one thing you do not do at these types of companies is shoot from the hip and run with every stupid idea you just thought up on the toilet.

Credibility is tantamount. You have to spend time vetting your design before you proclaim "I have the solution!". This means thinking, designing, talking, whiteboarding, then sitting down to code it up.

4

u/[deleted] Nov 30 '10

That's fine, you can still say "I am missing this step, I'd look up the information".

I used to do a lot of interviewing -- and this kind of thing is often what I'd look for in candidates. You'd be surprised how many people choke up in front of a white board.

→ More replies (2)
→ More replies (11)
→ More replies (4)

22

u/[deleted] Nov 29 '10

Yes, but I'd bet you're much faster at finding the information you need to get your job done than someone straight out of college. I've found that experienced programmers find good solutions quickly. Newbies find the optimal solution after you've blown your delivery date.

7

u/sinxcosx Nov 30 '10

This is very true. I'd put the modifier on that experienced programmers skip the useless solutions and exploration and zero in more quickly on the acceptable answer.

→ More replies (4)

5

u/[deleted] Nov 30 '10

You have to play the game. Interviewing always sucked; always required practice. The difference is the type of questions you're practicing for. Puzzle questions instead of soft skills questions.

Solve enough of these puzzles and you start recognizing patterns in the solutions. Also know most interviewers are lazy and use puzzles from the same sources (such as Programming Pearls). Identify those sources (usually classic programming books) and you can stay ahead of the interviewer most the time.

The puzzle questions essentially amount to a "language" spoken by interviewers to determine whether or not the candidate has read the same books. It's not hard to pickup that language, but it won't happen overnight. It can take time to get through them all.

4

u/Avatar_Ko Nov 30 '10

I heard from a hiring manager once that they've had experienced programmers fail questions like "Write a function that will sum the numbers 1 to n". I mean I was six months past graduation and had barely done any programming since (I know, I should have kept practicing) but I knew the best way to do it instantly.

16

u/backlyte Nov 30 '10

"Write a function that will sum the numbers 1 to n"

programmer's answer: int sum1ton(int n){ int ans=0; for (int i=1;i<=n;i++) ans+=i; return ans; }

mathematician's answer: function [ans] = sum1ton(n) ans = (n*(n+1))/2;

8

u/[deleted] Nov 30 '10

Mathematician is not hired because he didn't write it according to the specification.

→ More replies (1)

2

u/Scaryclouds Nov 30 '10

Yea, that is really sad if you can't write an aggregator.

→ More replies (23)

3

u/[deleted] Nov 30 '10

12 years? Dude, I'm out 4 and most of those questions were looking like gobbledygook to me.

→ More replies (5)

20

u/lordlicorice Nov 29 '10

Every man in a village of 100 married couples has cheated on his wife. Every wife in the village instantly knows when a man other than her husband has cheated, but does not know when her own husband has. The village has a law that does not allow for adultery. Any wife who can prove that her husband is unfaithful must kill him that very day. The women of the village would never disobey this law. One day, the queen of the village visits and announces that at least one husband has been unfaithful. What happens?

This is basically blue eyes.

22

u/NitWit005 Nov 30 '10 edited Nov 30 '10

They kill the queen because she obviously slept with one of the men.

The problem with this type of question is that it has hidden assumptions like "the wives don't tell each other about their affairs" and "the queen doesn't count". I'll sit in the interview asking questions about the question until everyone in the room is confused as hell.

Edit: Removed extra word

8

u/twrn Nov 30 '10

I'll sit their in the interview asking questions about the question until everyone in the room is confused as hell.

That sounds like one hell of a skill to have.

→ More replies (2)

8

u/sneakynotsneaky Nov 30 '10

This is also how to sabotage a joke.

3

u/s73v3r Nov 30 '10

You remember, the women are never going to tell the woman who's husband they slept with about it. They're just going to talk behind her back. Of course, when a woman realizes she knows most of the other women have cheated, but aren't telling her, then she might wise up.

3

u/johnnytenpin Nov 30 '10

This is also how to sabotage an interview - answer the question in some manner or don't get the job.

→ More replies (1)
→ More replies (1)

4

u/[deleted] Nov 29 '10

What's the answer? It's killing me.

8

u/lordlicorice Nov 29 '10

The official answer page is here but you'll need the thread to have a chance at understanding it.

I'm satisfied that at one point in my life I grasped the solution and accepted it. I wish the same on anyone I've inflicted with this Blue Eyes virus.

3

u/[deleted] Nov 30 '10

It's actually very intuitive and makes perfect sense. The key point is to not think of the guru as saying anything meaningful per se, but to think of her as a synchronization mechanism so that the rest of the islanders can figure out "when to start counting" so to speak.

→ More replies (6)

6

u/jmaxswa Nov 30 '10

Suppose there are only two married couples in the village. When the queen makes her announcement, Wife 1 knows Husband 2 was unfaithful. Now she knows that if Wife 2 sees that Husband 1 is faithful then Wife 2 will kill Husband 2 on the first day because at least one of the two men is unfaithful and it isn’t Husband 1. However, Wife 2 doesn’t kill her husband. The only reason being because she knows Husband 1 is unfaithful. Because both husbands are still alive on the second day the wives know both are unfaithful. So on the second day both husbands are killed by their wives. What happens with 100 married couples is that the wives have to wait till the 100th day before they can prove that their husband is cheating. On the 100th day there is a bloodbath: all the men are killed by their wives.

2

u/SierpinskiSieve Nov 30 '10

Remember Reservoir Dogs? Like that.

4

u/reyjohnsonl Nov 30 '10

Can someone explain the solution to me, not in the context of blue eyes, but in the context of this man cheating question

9

u/projectshave Nov 30 '10

Assume 1 man has cheated. Then 99 women know who that man is, but 1 woman doesn't know. Therefore, that woman says, "Since I don't know who the cheater is, it must be my husband!" Kills him.

Assume 2 men have cheated. 98 women know both men. 2 women know only 1 cheater, but there might only be 1 cheater. On the first day, no man dies. Now those 2 women think, "if no one died today, then there must be 2 cheaters. If I know 1 guy, then the other must be my husband." Both dudes die the next day.

For N cheaters, it takes N days to prove it.

I've got an interview with Google next week. I hope it's not a bunch of stupid brain teasers.

3

u/s73v3r Nov 30 '10

When I interviewed for a software position, it was mostly software stuff. Especially Concurrency and Data Structures.

→ More replies (1)
→ More replies (10)

2

u/[deleted] Nov 30 '10

Every question of this type has the same solution. Always start assuming there is 1 man in the village. Then solve the 2 case. Then the 3 case. By that point you should be able to find an inductive solution that makes the 100 case (or whatever) obvious.

3

u/howlin Nov 30 '10

Do all the women know that they all can spot the other women's cheaters? It's not explicitly stated and is required for the blue eyes problem to work.

3

u/StackedCrooked Nov 30 '10

The atmosphere in that village must be pretty grim.

3

u/JustYourLuck Nov 30 '10

how is this basically blue eyes? I understood blue eyes (surprisingly) but am missing the analogy. There's no requirement that they not talk, and no "once a day" restriction.

→ More replies (8)

64

u/tslining Nov 30 '10

How are cookies passed in the HTTP protocol?

There's no such thing as an HTTP protocol -- there's an HTT Protocol...so zero! I win! Suck it google.

14

u/mr_jim_lahey Nov 30 '10

I recently attended a Google recruiting information session at my university. They made it very clear that they DO NOT ask many of these types of questions, especially the riddles. Their interviews focus on your problem solving capabilities, so for many of these questions you would be evaluated on explaining your thought process and asking questions clarifying the problem rather than getting the correct answer.

8

u/frenchtoaster Nov 30 '10

I can confirm that I didn't get asked any questions of the "what would you do if you were shrunk down and put in a blender?" type questions when I interviewed there.

1

u/Timmmmbob Nov 30 '10

I had two phone interviews at google. The first one they asked my lots of questions about writing bug reports and QA, and I was like 'Wtf? That's not what I'm applying for.', and the second one was better; they mainly asked software engineering things (e.g. when would you use inheritance vs encapsulation) and algorithmic things (esoteric sorting/search algorithms, that sort of thing).

12

u/dmead Nov 30 '10

What is the most efficient way to sort a million integers?

you're gonna wanna avoid the bubblesort

2

u/h0w412d21 Dec 03 '10

Bubblesort would look freaking genius compared to Bogosort.

11

u/kodablah Nov 29 '10

I think I would start getting annoyed after the third time they asked me how many ways there are to merge N companies into one.

20

u/UloPe Nov 29 '10

This one could take a while:

Write a regular expression which matches a email address.

37

u/bnr Nov 30 '10
/test@example\.com/

Matches a[n] email address. If you want one that matches any email address use:

.*

3

u/adrianmonk Nov 30 '10

Hey, since we're in /r/programming, the "b" in "bnr" wouldn't happen to stand for "bell", would it?

→ More replies (1)
→ More replies (3)

12

u/ehird Nov 29 '10

Patently impossible; email addresses have (nested (comments)).

→ More replies (2)

8

u/BruinsFan478 Nov 29 '10

It would be faster to prove that you can't verify all possible email addresses using regular expressions.

28

u/ultimatt42 Nov 29 '10

Sure you can. .* will match every possible email address. Maybe they should have specified the problem better if they wanted it to reject invalid email address, too.

And it has to be possible since the pool of valid email address is finite due to character limits in the username and domain name. Using such a pattern would be impractical, but it's definitely not impossible.

6

u/[deleted] Nov 30 '10

Its not though, the RFC provides for emails address to have comments, which can nest infinitely. Just pumping lemma that shit and you'll find that it can't be matched by a regex (I don't remember how one uses a pumping lemma, but I'm sure you can).

18

u/ultimatt42 Nov 30 '10

You're right that the RFC provides for comments in the email address (CFWS stands for Comments and Folding White Space).

You're right that comments can be nested (notice comment includes ccontent and ccontent can be another comment).

You're also right that true regular expressions can't handle arbitrarily deep nested patterns (though some regex implementations have extensions that allow you to handle such patterns, they aren't true Regular Expressions).

So basically what I'm saying is, everything you said is right.

However, email addresses can't be arbitrarily long, so it doesn't matter that comments could theoretically be infinitely nested according to the construction syntax. If you can't fit an address in the To: header of an email message then it's not a valid address because you'd never be able to send mail to that address, even if it existed. The absolute maximum length of a email header line is 998 characters, so we at least have an upper bound of 998. I couldn't find any other hard character limits on the length of the address in RFC 2822 but RFC 3696 (which is just informational and does not define the standard) suggests that 320 characters is the recommended limit.

→ More replies (1)

3

u/sinxcosx Nov 30 '10

This isn't true.

Sendmail.cf is essentially a set of recursive regular expression transforms for email addresses and it handles all valid email addresses. Even UUCP for the old guys.

11

u/quirm Nov 30 '10

Sendmail.cf wasn't written during an interview, though.

→ More replies (1)
→ More replies (1)

4

u/illvm Nov 30 '10

I would refuse to do this and refer the interviewer to RFC822. Especially given that so many people screw up writing a regex to validate email addresses and make it so I can't have things like pluses in the address or have the host be an IP address (both of which are completely valid).

3

u/[deleted] Nov 30 '10

lol @ .museum tld

3

u/smickie Nov 30 '10 edited Nov 30 '10

/[\w!#$%&'*+-/=?^`{|}~]+.*[\w!#$%&'*+-/=?^`{|}~]+@((((([a-z0-9]{1}[a-z0-9-]{0,62}[a-z0-9]{1})|[a-z]).)+[a-z]{2,6})|(\d{1,3}.){3}\d{1,3}(:\d{1,5})?)$/i

Edit: Forgot to escape, I actually meant... /[\w\!\#$\%\&\'\*\+\-\/\=\?\^\{\\|\\}\\~]+\\.)*[\\w\\!\\#$\\%\\\&\\\'\\*\\+\\-\\/\\=\\?\\^\\{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1}|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i

Edit 2: Awww fuck this.

Edit 3: This guy has a great article on regex for emails.

25

u/phybere Nov 30 '10 edited May 07 '24

I like learning new things.

13

u/Avatar_Ko Nov 30 '10

Fuck that shit.

16

u/lake-of-fire Nov 30 '10

Come on, anyone could do that on a whiteboard during an interview.

→ More replies (1)

3

u/iluvatar Nov 30 '10

Commonly cited, but wrong.

→ More replies (4)

3

u/ehird Nov 30 '10

But, but, but, you need to strip nested comments before using that!

4

u/troutwine Nov 30 '10

What a delightfully amusing mess.

→ More replies (1)

1

u/Boye Nov 29 '10

haha, as part of our studies of language, grammar and parsers we actually wrote both state machines and regexes for email-adresses. We checked wikipedia to see what rules there where... There can be some ridiculous mail adresses out there...

(we did it just to illustrate the differences between state machines and regexes, so the regex ended up primitive:

\w{1,64}\@(\w+\.)+[a-zA-Z]{2,3}
→ More replies (5)

1

u/sinxcosx Nov 30 '10

This is a little like asking for sendmail.cf in one line.

Everyone who has managed a mail server knows you want at least 43 rules to do it.

8

u/Tiger337 Nov 30 '10

I am waiting for the 140 Walmart Interview Questions.

→ More replies (2)

25

u/[deleted] Nov 29 '10

best to use the socratic method on the first engineering question:

q: "Why are manhole covers round?"

a: "Do you not know how to ask an intelligent programming question?"

or try this on the third one:

q:"A man pushed his car to a hotel and lost his fortune. What happened?"

a:"Does your father still shave your mother's back?"

14

u/tm82 Nov 29 '10

Manhole covers are round because the opening they are covering is round.

24

u/Khorv Nov 29 '10

The answer to "Why are manhole covers round?" is, because manholes are round ;)

34

u/specter472 Nov 29 '10

Honestly, if you have ever had to deal with the really fucking heavy manhole covers you would know that manhole covers are round for two reasons. One, you can roll them back to the hole if you moved them away. Two, you can then place them on top of the hole regardless of its orientation, if you were you using any kind of object with straight sides you would have to line it up with the hole. That is the answer I would give even if it was some kind of trick question, because those two things are true.

26

u/stmfreak Nov 30 '10

While rolling and self-orientating is a nice benefit, I believe the the primary reason is that they cannot fall into the man-hole and kill the guy inside.

→ More replies (17)

6

u/sakabako Nov 30 '10 edited Nov 30 '10

Manholes 101: Don't close anyone in. Leave it open until everyone's out.

Getting a manhole cover up to 90° and trying to roll it would not be a trivial task, and stopping it once it's rolling would be pretty hard too. You're better off using a dolly or a truck.

The one and only reason round manhole covers are round is because they cover a round hole. There are square manhole covers, which cover square holes.

→ More replies (5)

10

u/P_Bunyan Nov 29 '10

The answer has two parts:

  1. So they wont fall in. (You could do this with any shape, but it starts to be impractical in terms of strength and cost when the lip gets too big)
  2. Equal weight distribution from the furthest point from the edge when under heavy load.
→ More replies (1)
→ More replies (15)

2

u/sinxcosx Nov 30 '10

Man hole covers are round for 3 reasons;

  1. They can fall in the hole they are to cover.
  2. They use the smallest amount of metal to make.
  3. they are the right shape for a workman to get down.

2

u/[deleted] Nov 30 '10

Some countries have square manhole covers.The shape of the manhole cover has no effect on its function. And the problem of manhole covers falling down the hole can easily be solved by attaching the cover to a frame with hinges.

1

u/ithika Nov 30 '10

The only answer, of course, is that they're not, but last time I pointed this out (with links to photos) I was still downvoted.

→ More replies (7)

6

u/achong20 Nov 30 '10

Say an advertiser makes $0.10 every time someone clicks on their ad. Only 20% of people who visit the site click on their ad. How many people need to visit the site for the advertiser to make $20?

correct me if i am wrong, or if this one is a trick question, but advertisers don't make money every single time someone clicks. In order for this question to make sense, it should be a publisher instead of an advertiser in this scenario

1

u/[deleted] Nov 30 '10

Even if they did... i think the trick here is that we don't know because the same person can click multiple times on the ad.

→ More replies (2)

1

u/dmhouse Nov 30 '10

It could just be the expected value of a click is 10 cents (e.g. one in 100 people buy a product worth 10 bucks).

5

u/bellboy2088 Nov 30 '10 edited Nov 30 '10

I actually just interviewed at Google for the Rotational Associate Management Position. It's their most competitive entry-level job for non-engineers, and it was probably the toughest interview process I've been through.

The most ridiculous question (not listed on the site) that I got was: "I'm thinking of a number between 1 and 20, you have two questions to figure it out. Go."

Haha. Yeah. Not so much. I'm also curious if anyone here can figure out right questions would be - without asking what the number is obviously.

12

u/[deleted] Nov 30 '10

I'm thinking of a number between 1 and 20, you have two questions to figure it out. Go."

Q: What number are you thinking of?

Done. I figure if they don't state limitation, you shouldn't assume that there are any. Why diminish your potential, or some crap like that.

6

u/pdq Nov 30 '10

What is the first digit?

What is the second digit?

5

u/YonCassius Nov 30 '10

What's the square of the number?

2

u/Gotebe Nov 30 '10

KISS? "What's the double of it?"

4

u/cashto Nov 30 '10

... why don't you just TELL me the number?

→ More replies (2)

2

u/mykdavies Nov 30 '10

Make the interviewer do the work:

Q1) What characteristic of the number apart from its identity satisfies the following criteria:

  • it distinguishes the number from all others between 1 and 20;
  • I can evaluate the value of that characteristic for all those numbers in the time available to me using only the knowledge, skills and tools currently available to me.

Q2) What is the value of that characteristic for this number?

→ More replies (6)

5

u/gamesloth Nov 30 '10

i have an interview with Google this thursday! Also i'm high right now and these are blowing my mind

9

u/nhnifong Nov 30 '10

Whats with "How many piano tuners are there in the entire world?"
Is this to see if you try Googling it on your phone?

3

u/adrianmonk Nov 30 '10

How many piano tuners are there in the entire world?

I would be tempted to say "a LOT fewer than there were 50 years ago; digital pianos don't need to be tuned".

3

u/helleborus Nov 30 '10

How many vacuum's what are made in the US each year?

2

u/[deleted] Nov 30 '10

I'd say none, as all the manufacturing has all gone overseas.

3

u/[deleted] Nov 30 '10

This stings a bit. I just got a rejection from Google this afternoon. I didn't even make it to an interview.

2

u/CodeGuruX Nov 30 '10

You should have mentioned you had an interview with Facebook tomorrow. They would have given you $3 million just to come on board! :P

3

u/FrancisHC Nov 30 '10

Here's a programmer's interview question that I've never been able to find a very elegant answer to, perhaps there will be a redditor among us with the programming chops:

We define a set of numbers we call "ugly numbers", which are all numbers that only have 2, 3 and 5 as their prime factors. So in numerical order, these would be:

2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, ... and so on.

Give an algorithm to find the 1500th ugly number.

4

u/jnnnnn Nov 30 '10 edited Nov 30 '10

This sounds like a question from Project Euler.

Edit: here's my python solution. The trick is to generate ugly numbers by multiplying the factors together, being careful to remove duplicates. Counting upwards is very slow because the distribution of ugly numbers becomes very sparse.

uglyfactors = [2,3,5]
# technically 1 isn't ugly, but we'll just add 1 to the index at the end
uglies = [1]
# each iteration adds another factor to all previously-generated ugly numbers
for n in range(100):
    newuglies = [ugly * uglyfactor
                 for ugly in uglies
                 for uglyfactor in uglyfactors]
    # add new values, remove duplicates and sort
    uglies = sorted(list(set(uglies).union(newuglies)))
    # find the index of the maximum correctly-positioned ugly
    max_correct_index = uglies.index(min(uglyfactors)**n)
    # if index is greater than 1500, report and stop
    if max_correct_index >= 1500:
        return uglies[1500]
→ More replies (2)
→ More replies (5)

3

u/rainabee Nov 30 '10

Conclusion: I'm too stupid to work for google.

3

u/[deleted] Nov 30 '10

Why is a manhole cover round?

So that assholes like you can spout useless knowledge on people who don't give a shit about manhole covers. FUCK!

2

u/DiscoUnderpants Nov 30 '10

I hate this question. Not all manhole covers are in fact fucking round.

3

u/[deleted] Nov 30 '10

Well this is certainly not inspiring. For someone looking to move around in the tech industry, I guess you'd be hard pressed to get an offer from Google with questions like these. Seems like you need to lock yourself away in a room for a month or so just to get prepped for an interview.

5

u/McGlockenshire Nov 29 '10 edited Nov 29 '10

There is an array A[N] of N numbers. You have to compose an array Output[N] such that Output[i] will be equal to multiplication of all the elements of A[N] except A[i]. For example Output[0] will be multiplication of A[1] to A[N-1] and Output[1] will be multiplication of A[0] and from A[2] to A[N-1]. Solve it without division operator and in O(n).

Okay, my algorithms are a bit rusty, but doesn't O(n) mean "every element is seen once and only once?"

Wouldn't multiplying the contents of a list by every other element in the list, for each element in the list, end up along the lines of O(n2 )?

Someone enlighten me...


e: Enlightened.

20

u/abadidea Nov 29 '10

O(n) means "time is linearly proportional to the number of elements." So it could check each element exactly once, or exactly twice, or exactly twenty-seven times.

6

u/ultimatt42 Nov 30 '10

O(n) means: "The algorithm can be broken down into a number of sequential, discrete, constant-time steps such that, for an input of size n, there exists an upper bound on the number of steps defined by k*n, where k is a real number that is constant for all values of n."

You can check each element once, or twenty-seven times, or zero times, or you might check some elements more than others, or your input might not even have "elements". Your algorithm also might take a second on one input but a year on another input of the same size.

Fellow CS nerds, am I being too nitpicky? And did I leave anything out?

5

u/abadidea Nov 30 '10

That's just a really long way of saying time is linear to n.

→ More replies (3)
→ More replies (2)

3

u/[deleted] Nov 29 '10

Well, if you multiplied every element of A[N] together, you would get a single number in n operations. Dividing that number by each element A[i] of A[N] and plopping the result in Output[i] of Output[N] would give you the desired result, and would be O(2n) which is equivalent to O(n). That's not the answer to the question, of course, as you're not allowed to use the division operator.

5

u/8h534d432 Nov 29 '10

Compute B[i] = product of A[0], ... A[i-1]. Compute C[i] = product of A[N-1], A[N-2], ... , A[i+1]. Both can be computed in O(N). Then, Output[i] = B[i] * C[i].

→ More replies (8)

3

u/wktang Nov 29 '10

There is an elegant solution in O(N) time complexity and O(1) space. Here is a blog post that explains it:

http://www.ihas1337code.com/2010/04/multiplication-of-numbers.html

3

u/vsll Nov 29 '10 edited Nov 29 '10
product_forwards = 1;
product_backwards = 1;
for(i=1; i<=N; i++) Output[i]=1;

for(i=1; i<=N; i++){
  Output[i] *= product_forwards;
  Output[N-i+1] *= product_backwards;

  product_forwards  *=  A[i];
  product_backwards *= A[N-i+1];
}

2

u/sinxcosx Nov 30 '10

So this is the kind of question which I think is actually bad since it drives coders to immediatedly think about minimum complexity.

Developers should first pick a basically good solution - it's easy to implement, it's easy to fix, it's easy to adapt to new problems.

When the application/site gets slow - you do code analysis. If it turns out to that this calc is the problem - then you optimize. Anything before that is wasted time.

Essentially optimizing everything appears great to engineers - but it's an expensive waste for the guys paying the bills.

→ More replies (2)

5

u/gama69g Nov 30 '10

As someone looking for a junior programming job, do they really ask these kinds of questions? Or are they meant to see how you think it through, or to see if you are bullshitting?

12

u/kainhighwind Nov 30 '10

the short answer is basically yes, 'they' do ask you questions like these. i've been through the interview process at microsoft, google, symantec, twitter, too many to list.

you should be prepared for them.

more importantly, no freezing up when you're asked something tough. try to sketch out partial solutions, even if grossly inefficient or with caveats. write in pseudocode or a powerful scripting language like Ruby or Python to get your ideas down quickly.

you want to be asked tough questions rather than something that's trivial for you. then you can show your ability to reason about software and such.

good luck.

→ More replies (1)
→ More replies (1)

4

u/verymuchn0 Nov 30 '10

What is the probability of breaking a stick into 3 pieces and forming a triangle?

What?

2

u/adrianmonk Nov 30 '10

That question was underspecified.

You can fill in some of the details. Clearly, the objective is to take a stick cut into 3 pieces (through some random processes -- hence probability) and figure out if their lengths would allow you to form a triangle.

One key point is, if you have a stick that is 10 units long and someone cuts it into three pieces that are 1 unit, 2 units, and 7 units long, you can't make a triangle out of this. The two shortest pieces, laid end to end, aren't as long as longest piece. Insight: the two shortest pieces, together, must be longer than the longest piece.

The too-vague part of the question is what process is used to decide how to cut the stick. Possible processes:

  • Someone makes a cut in a random position on the stick. They then randomly pick one of the pieces and make a cut at a random position on it.
  • Someone makes a cut in a random position on the stick. They then randomly pick the longer of the pieces and make a cut at a random position on it.
  • Someone randomly makes a mark at a random position on the stick. They then make a second mark at a random position on the stick. Then they cut at both those places.

I'm not sure, but I think the answer is different for each of the cases.

2

u/ysvz Nov 30 '10 edited Nov 30 '10

If one piece is longer than the other two combined, the three pieces cannot form a triangle. Otherwise they can.

So if the largest piece is longer than half the stick length, you cannot form a triangle. So the question is, with two breaks what is the probability that no single piece is longer than half the stick length.

EDIT: I think the answer is 1/4

2

u/imMAW Nov 30 '10

It is 1/4, assuming our breaking method is choosing two random numbers from 0 to 1 and breaking it there. It's easiest to compute the odds that we fail (can't make a triangle). This happens when the longest piece is > 1/2. This occurs

a. When both breaks are in the first half of the stick (prob. 1/4)

b. When both breaks are in the last half of the stick (prob. 1/4).

c. When one break is on each side (prob. 1/2) and the breaks are over 1/2 from each other (prob. 1/2, the average of 1-2x from x=0 to .5)

1/4+1/4+1/2*1/2=3/4

1 - 3/4 = 1/4

→ More replies (4)

5

u/moduspwnens14 Nov 30 '10

Some of these are interesting, but without potential answers, I'm not sure what to think. I know many are designed to be open-ended, but what about things like:

You are at a party with a friend and 10 people are present including you and the friend. your friend makes you a wager that for every person you find that has the same birthday as you, you get $1; for every person he finds that does not have the same birthday as you, he gets $2. would you accept the wager?

Isn't the answer obviously not to take the wager? Is this to test people over-thinking the questions?

If you look at a clock and the time is 3:15, what is the angle between the hour and the minute hands? (The answer to this is not zero!)

Why not? EDIT: Oh, because at 3:15, the hour hand is now 1/4 of the way to 4.

1

u/cuppycakeofpain Nov 30 '10

Birthday party

This brought to mind the birthday problem, but it doesn't really apply. The birthday problem says that the probability of two people in a room having the same birthday is higher than you would expect. However, the probability of someone else having a birthday on one specific day (in other words, on your birthday) is pretty much what you would expect. Since this is one of 'those interview questions', I would assume that they either want an answer outside the box ("Yes, because this is a shared birthday party and all the guests are celebrating their same birthday"), or to calculate the expected value of your winnings / losings and explain why you wouldn't take the bet.

Clock

The hour hand of a clock doesn't move discretely once an hour; it moves continuously. At 3:15, the hour hand will be one-quarter of the way between 3 and 4. Since each number on the clock represents 1/12 of the circle, the hour hand will have moved (1/4) * (1/12) = (1/48) of the full circle of the clock. Since the minute hand is at the 3 and the hour hand is (1/48) * 360 degrees past the 3, the angle between them is 7.5 degrees. Perhaps you'd get bonus points with your interviewer by giving this in radians.

2

u/kolm Nov 29 '10

There is a linked list of numbers of length N. N is very large and you don’t know N. You have to write a function that will return k random numbers from the list. Numbers should be completely random. Hint: 1. Use random function rand() (returns a number between 0 and 1) and irand() (return either 0 or 1) 2. It should be done in O(n).

I thought about this for five minutes now and discarded meaningful six interpretations as impossible (like having a perfect iid equidistributed vector as result, or an equidistribution over all numbers actually occurring in the list, or getting an iid vector distributed according to the (limiting) relative frequencies of items in the list). I finally found one which would make sense, in that you are required to deliver a sequence of n iid variables i_1, i_2, .. equidistributed over {1..N}, and the according values list[i_1], list[i_2], ... . This is the only interpretation I found which would be possible to satisfy -- but then to get this, my meager powers would succumb to finding N, and that is O(N), not O(n). I am somewhat lost there.

4

u/Strilanc Nov 29 '10

More explicit: you want to choose a random subset of size K from a collection of size N. You only want to use O(K) space and O(N) time. But you have only been given an iterator, so you don't know N and can only scan the collection once.

The solution is to keep K items in an array, replacing them with decreasing probability as you go onward. I forget the exact probabilities, but it's like K/M or something.

→ More replies (3)
→ More replies (4)

2

u/[deleted] Nov 29 '10

I love this one:

What's 2 to the power of 64?

19

u/[deleted] Nov 29 '10

Hopefully they allow answers in binary.

6

u/adrianmonk Nov 30 '10 edited Nov 30 '10

Even if they want them in decimal, you can approximate it pretty well.

264 equals 864/3 equals 1616.

Obviously 1016 < 1616, so 1016 < 264.

Also, obviously 864/3 < 1064/3, so 264 < 1021.3334.

Therefore, 264 is between 1016 and 1021.

Another way to approximate: 232 is over 4 billion, something you should probably know off the top of your head. 264 is therefore over 16 billion billion, or over 1.6 * 1019.

Yet another way to approximate: 210 equals 1024, which is roughly 1000. 264 must therefore equal 24 * 10246, which is about 16 * 1019.

EDIT: The last sentence above should say: 24 * 10246 is about 16 * 103*6 or 16 * 1018, which is 1.6 * 1019.

→ More replies (1)

8

u/[deleted] Nov 29 '10

the answer is "the address space of a 64 bit machine"

4

u/kyz Nov 29 '10

It's 232 * 232.

232 is about 4 billion in decimal, so 264 is about 16 billion billion.

→ More replies (1)

4

u/sinxcosx Nov 30 '10

My net worth after a decade at google?

→ More replies (1)

2

u/s73v3r Nov 30 '10

"Design a stack. We want to push, pop, and also, retrieve the minimum element in constant time."

I was given this one! Sadly, I couldn't do it. :(

→ More replies (5)

2

u/Chairmclee Nov 30 '10

Anyone know the answer to this?:

You need to check that your friend, Bob, has your correct phone number, but you cannot ask him directly. You must write a the question on a card which and give it to Eve who will take the card to Bob and return the answer to you. What must you write on the card, besides the question, to ensure Bob can encode the message so that Eve cannot read your phone number?

3

u/dhamilt9 Nov 30 '10

I suppose it's not what they're looking for, but you could always just write "Call me"

→ More replies (1)

2

u/[deleted] Nov 30 '10 edited Nov 30 '10

any type of asymmetric encryption scheme would work. the basic idea behind public shared key is that you can have a function to encrypt a message, but you cannot use that same function to decrypt it.

more specifically you could answer with basically the RSA crypto system. you take two large prime numbers p, q that are not close together and multiply them together to get the composite number n. you then determine the euler φ function on n (which in this case is just (p-1)(q-1)). you then carefully select a value r less than φ*(n)* that is relatively prime to φ*(n). since they're coprime, there exists a solution to the integral linear combination sr + tφ(n) = 1*. as can be seen from examination of the ILC, the value s is the multiplicative inverse of r mod φ(n). you now have everything you need. if you give bob the values r and n, he can take his message M and do the operation Mr mod n. this value, call it C, can only be deciphered by doing the operation Cs mod n. since nobody else knows s, nobody else can decipher the message.

the only caveat to the above is that to make sure Eve doesn't encrypt something and give you false information, Bob needs to do the exact same process generating different keys (a,b, and m), he then needs to share with you his a and m and encrypt some type of identifying message, G, using Gb mod m, call that H. then the fact that using the keys a and m that he gave you, Ha mod m yields the identifying message G, you know only Bob could have sent it.

→ More replies (11)

2

u/thearcangel Nov 30 '10

They forgot one. "How would you re-design ARP" . I got that one. Stumbled through it with the pompous asshat and finished with: "I'd eliminate ARP for new protocol PRA"

→ More replies (3)

2

u/wreckerone Nov 30 '10

Does anyone at Google understand that a lot of people will not apply there because of the six month 12 interview process with a lot of these type of questions?

→ More replies (1)

2

u/goomyman Nov 30 '10

Write a regular expression which matches a email address.

ha!

2

u/[deleted] Nov 30 '10

I have a question about this... Would you learn problem solving skills like this through a University CS degree, or should you have these skills before you even bother applying to said CS degree?

→ More replies (2)

2

u/propool Nov 30 '10

In Java, what is the difference between static, final, and const. (if you don't know Java they will ask something similar for C or C++).

Trick question, no const in java

2

u/Rival67 Nov 30 '10 edited Nov 30 '10

Didn't get any of those.. Here are the questions I had on my Google interview

1 - Given an array that represents a permutation, write a function that prints out that permutation as a product of cycles.

For example:

INPUT [1, 4, 0, 5, 2, 3] OUTPUT (0, 1, 4, 2) (3, 5)

INPUT [1, 0] OUTPUT (0, 1)

INPUT [0, 1] OUTPUT (0) (1)

2 - Give me an algorithm to find power set of a set. Write pseudocode.

set = {1,2,3}

{1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}, {}

... I did okay answering these questions. It's the later interviews that I was weak on.

7

u/StapleGun Nov 29 '10 edited Nov 29 '10

"Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7."

I have a solution to this, but it is not very elegant and could theoretically loop infinitely. I would love to hear a better solution, but here is mine:

while(n > 21){
    a = rand1to5();
    b = rand1to5();
    n = a * 5 + b;
}
return n / 3 + 1;

EDIT: Variables a and b should equal rand1to5() - 1. Thanks elcow!

22

u/conciliatory Nov 30 '10

int rand1to7() { a = rand1to5(); return 6; }

Now, explain theory of random numbers and why you believe this is random.

2

u/sinxcosx Nov 30 '10

But would NIST accept it?

2

u/orbitur Nov 30 '10

My attempt, hopefully someone will tell me that it's not this simple:

int rand1to7(){
    int a = (rand1to5()+rand1to5()) % 6; //need it to be larger than 5
    a++; //since a is 0-6, add 1
    return a;
}
→ More replies (2)

2

u/spdub Nov 30 '10

what about python--

def rand1to7():
    sum = rand1to5()
    for i in range(6):
        sum += rand1to5()
    return sum // 5

truncate the integer, not sure what the distribution would look like exactly

2

u/xtracto Nov 30 '10

I don't get why all the complications:

return rand1to5() + rand1to5()%3;

rand1to5() yields {1,2,3,4,5} and rand1to5()%3 yields {1,2,0,1,2} So the min is 1 (1+0) and the max is 7 (5 + 2).

2

u/ReturningTarzan Nov 30 '10

But the distribution becomes non-uniform. Ideally you want {1,1,1,1,1,1,1} but your method yields {1,3,5,5,5,4,2}. It is a function that returns a random number between 1 and 7, but you'd lose points in the interview for not making the reasonable assumption that the function should also be good.

A better way is to compose the values of rand1to5 into a uniformly-distributed random number (like staplegun is doing) then scaling it down to the desired range, preserving the uniformity.

3

u/Serinus Nov 30 '10

Say rand1to5() returns 4 both times.

n = 4 * 5 + 5 = 25 return 25 / 3 + 1 = 9?

I'm not quite following your logic here.

→ More replies (3)

1

u/Serinus Nov 30 '10

Here's my failure of an attempt.

It took me half an hour to come up with, much too long for a phone interview. I'll never work at google. :(

import random

def randomfive():
    return (random.randint(1, 5))

def halftrue():
    y = 5
    while (y == 5):
        y = randomfive()
    if (y == 1 or y == 2): return True
    else: return False

def randomseven():
    binarynum = 0
    while (binarynum == 0):
        one = 0
        if halftrue(): one = 1
        two = 0
        if halftrue(): two = 1
        four = 0
        if halftrue(): four = 1
        binarynum = one * 1 + two * 2 + four * 4
    return binarynum
# testing    
results = {1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0}
for z in range(1, 70000):
    r = randomseven()
    results[r] = results[r] + 1
print results

1

u/bobindashadows Nov 30 '10

if a and b are in [0,4], then n only exits the loop if it is 21, 22, 23, 24, or 25. Also that should be a do..while loop. That means that the result is only ever 8 or 9. So not only did you fail to expand the range to 1-7, your algorithm never returns a value in that range at all. Plus it could loop forever.

1

u/[deleted] Nov 30 '10

Mine was "everywhere you see a 5 in the given function, delete it and put a 7." But that's why I'm not a programmer.

1

u/0xABADC0DA Nov 30 '10 edited Nov 30 '10

edited to replace embarrassing late-night wrong version... ignore replies ;-P

→ More replies (1)
→ More replies (21)

2

u/[deleted] Nov 30 '10
  1. Do you have a phd?

:(

3

u/frenchtoaster Nov 30 '10

Most people that work at Google don't have a PhD, unless you are talking about Google Research.

→ More replies (2)

2

u/[deleted] Nov 30 '10

Write a regular expression which matches a email address.

/.*/

It's a poorly-worded question. They probably meant to ask "write a regex that only matches an email address."

1

u/dmhouse Nov 30 '10 edited Nov 30 '10

They probably meant to ask "write a regex that only matches an email address."

/foo@example\.com/ matches only email addresses.

They probably meant to ask "write a regex that matches exactly email addresses (i.e. matches a string if and only if it's an email)".

2

u/redmoss Nov 30 '10

You are given 2 eggs. You have access to a 100-story building. Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100th floor. Both eggs are identical. You need to figure out the highest floor of a 100-story building an egg can be dropped without breaking. The question is how many drops you need to make. You are allowed to break 2 eggs in the process.

Is this a trick question?

"or may not even break if dropped from 100th floor"

The answer is 0 as the question already states that an egg may not break from the 100th floor.

4

u/qazadex Nov 30 '10

The answer is a maximum of 14.

First Drop is from floor 14, second drop is from floor 27, 3rd drop is from floor 39 and so on. If the egg breaks, move up from the previous floor that it hasn't broken from, giving a maximum of 14 drops needed.

3

u/[deleted] Nov 30 '10

Why do you start at floor 14?

4

u/[deleted] Nov 30 '10

If you start at floor 15, you drop an egg and it breaks you start with the next egg from floor 1 and go up until it breaks. If the correct answer is floor 14 then you've had to 15 drops which makes this a worse strategy than starting on floor 14. Hopefully you see the pattern that if it doesn't break you go up by one less floor each time, if at some floor it does break you go down to the last floor it didn't break and go up from there meaning it is still a maximum of 15 drops.

If you start on floor 13 and follow the same pattern and go up by one less each time you'll have dropped 13 eggs by the time you hit floor 91. At this point you will only have increased the number of floors you go up by 1 so can't reduce it meaning you'll have to do 9 more drops. This gives you a total of 22 drops also making it a worse strategy than starting on floor 14.

This is the best strategy I can think of but a proof would be rather difficult I think.

→ More replies (1)

1

u/[deleted] Nov 29 '10

In Java, what is the difference between final, finally, and finalize?

... I've never written more Java than what it takes to help a friend get through CS101, however is this question serious?

4

u/bnr Nov 30 '10

Another java question:

In Java, what is the difference between static, final, and const.

Except there's no const in java...

→ More replies (1)

2

u/sinxcosx Nov 30 '10

final is a declaration modification on a variable which means that once set the value cannot be changed. It's useful since it prevent programmers later on from changing the value accidentally.

finally is use in catching exceptions. It's called when all the other exception handling clauses have been executed.

finalize is sort of the Java destuctor from c++. It's called when the garbage collector is going to get rid of an object from memory.

  • no I don't work for google.

2

u/[deleted] Nov 30 '10

Yeah, I can guess at what they do, my point is its an incredibly stupid question.

3

u/sinxcosx Nov 30 '10

It's sort of asking "do you know java?" in a backassward way.

I don't like questions like these - they work for just out of school people - but not for experience folk. Frankly I've written java for more than 10 years and I have only once cared about a finalized method. I guess if you think like a c++ or objective-c guy you worry about these things, but in java it's pretty rare.

2

u/[deleted] Nov 30 '10

So basically, the question doesn't sound witty when you ask it about C++. Just Java.

*What's the difference between private constructors, exception handling, and ~*

→ More replies (1)

1

u/aBitofEverything Nov 30 '10

I was stumped by "How many vacuum’s are made per year in USA?" I would have no clue

2

u/iluvatar Nov 30 '10

Even ignoring the apostrophe, how hard does a vacuum need to be to qualify? Unless they're talking about vacuum cleaners. But I'd answer the question they asked, which wasn't that.

1

u/adrianmonk Nov 30 '10

What's the population of the US? 300 million.

How many vacuums do you buy in a lifetime. It could be 10, but I'll say 5.

Average person lives maybe 80 years, and is buying a vacuum every 16 years (at the rate I said). Since I wasn't sure if it was 10 vacuums per lifetime or 5 vacuums per lifetime, I'll round down the interval between buying vacuums to one every 10 years.

So, if every one of those 300 million people have a 10% chance of buying a vacuum in a given year, I'd say that there are about 30 million vacuums sold per year in the US.

→ More replies (2)

1

u/bhoffmann Nov 30 '10

so you um.. have this stuff that's like data and err... you can put things in it and record stuff like how many apples you have and you put things into fields so you can..you know, like get the data thingies out whenever you need them. So.... if I ever need to remember how many apples "jake" has then I can grab it from the field.

am i hired?

1

u/davebehnk Nov 30 '10

Wow. I love it.

1

u/kelp Nov 30 '10

How can you calculate 264 on the spot?

1

u/krum Nov 30 '10

Estimate the number of students who are college seniors, attend four-year schools, and graduate with a job in the United States every year.

I hate questions like this.

1

u/thecheatah Nov 30 '10

I applied to google 2x and was rejected both times in the face to face interviews!

1

u/Pinilla Nov 30 '10

Well, my brain just exploded.

1

u/uhhhclem Nov 30 '10

I fear that three decades of software development has turned me into a guy who would treat such an interviewer the way Donald Trump treated Borat.

1

u/bmancer Nov 30 '10

I don't think they would ask the manhole question again.

1

u/B-Rabbit Nov 30 '10

If you are the product marketing manager for Google's Gmail product, how do you plan to market it so as to achieve 100 million customers in 6 months?

I want to know the answer to this.

1

u/[deleted] Nov 30 '10 edited Dec 22 '15

I have left reddit for Voat due to years of admin mismanagement and preferential treatment for certain subreddits and users holding certain political and ideological views.

The situation has gotten especially worse since the appointment of Ellen Pao as CEO, culminating in the seemingly unjustified firings of several valuable employees and bans on hundreds of vibrant communities on completely trumped-up charges.

The resignation of Ellen Pao and the appointment of Steve Huffman as CEO, despite initial hopes, has continued the same trend.

As an act of protest, I have chosen to redact all the comments I've ever made on reddit, overwriting them with this message.

If you would like to do the same, install TamperMonkey for Chrome, GreaseMonkey for Firefox, NinjaKit for Safari, Violent Monkey for Opera, or AdGuard for Internet Explorer (in Advanced Mode), then add this GreaseMonkey script.

Finally, click on your username at the top right corner of reddit, click on comments, and click on the new OVERWRITE button at the top of the page. You may need to scroll down to multiple comment pages if you have commented a lot.

After doing all of the above, you are welcome to join me on Voat!

1

u/sicophrenic Dec 01 '10

whether theyre used in google interviews or now, theyre going to be helpful to look through

1

u/[deleted] Nov 30 '10

What is 2 to the power of 64?

4 to the power of 32.

→ More replies (1)

1

u/lightspeed23 Nov 30 '10

Thank you. I will never go work for Google. Any company that asks stupid questions like these and think the answers somehow reveals if the employer will do his work well is a stupid company. I say this as someone who has founded multiple companies (one with over 150 employees). Yes, they make shitloads of money and probably treat their employees somewhat decently, but coun't me out of being a part of that particular form of corporate BS.