Live data from Hacker News

My Job Interview at Google

catonmat.net

71–80 of 114 posts

Re: My Job Interview at Google

#71
post #35

Earlier quoted context omitted.

lol, thanks. I could have said x[i] is the same as ^(x + i) and really thought that was the correct syntax. The problem is I have used enough languages and dialects that I really can't brush up on it all. I just say if it's been five years, let me break out my cheet sheet for that stuff. PS: Ok, if it was really just a C job of course I would focus on that. Edit: Dammit it is like riding a bike. I have been having C…

Maybe it was Visual C++ you were programming in. ^ is for a handle to a object on the managed heap so it's almost the same as pointer. http://msdn.microsoft.com/de-de/library/yk97tc08.aspx

I was thinking it was Pascal - I think ^ is the syntax for pointers in Pascal, but the last time I programmed in that language, I was 12.

Re: My Job Interview at Google

#72

I've seen this guys articles get posted on reddit/hacker news over the course of the past few years and he just seems like a tome of knowledge that keeps expanding at a rapid pace Buddy, you have a lot of time on your hands and you're using it well, keep chugging along, looks like you're close to your dream job

About time to see the light and decide to start up his own company I'd think :) You always have to ask yourself whether a dream job is really about doing the work, or is it about being validated by the cool kids.

Re: My Job Interview at Google

#73
post #11
post #5

I think sometimes even the very well qualified (and Peter should be) do not survive the interview grind. Would be simply silly if that off by one error was the cause for rejection.

Could be they didn't have any more H1B slots left. In my experience large companies just call in people for interviews, and only afterwards do they think about how/when they could hire them.

If that were the case, I suppose his big mistake was specifically requesting the Mountain View campus. It looks like they asked that question up front so that they could figure out which teams he should interview with; he might have stood a better chance at another campus.

Re: My Job Interview at Google

#74
post #62

Isn't this level of interviewing kind of excessive and time-expensive? If I were Google, I would do the following: 1) Have the first interviewer be the best/most-appropriate interviewer for the position (manager, lead dev, whatever). Have them write down in a sealed envelope a "hire" or "no hire" statement after the interview. 2) At the end of the assorted interviews, measure how often the first interviewer is correc…

you'd get 98% of the value with 10% of the time invested. Hard to say. The economics of hiring aren't intuitive - a bad hire can do a lot of damage, esp. if it's a management position (which this wasn't, I know). It's probably better to nicely turn down 10 people (and nicely ask them to re-apply in 6 months) than to let in 1 charming, but conniving and free-riding bullshitter into your team.

I dunno-- I'm a big fan of "fire fast". If you can't detect a charming, conniving, free-riding bullshitter in 1-2 weeks of working with them, how are you going to detect 'em with 10 man-hours worth of interviews?

Re: My Job Interview at Google

#75
"... Then I found all the other blog posts about interviews and interview questions at Google ... She told me she was working at Google for two years and was very happy about it ... We went to Asian food restaurant (located in Googleplex) and I had all kinds of delicious foods. All free! ..."

I'm still wondering, who's trying to game who?

Re: My Job Interview at Google

#76
post #16

What are the likely reasons that he did not get hired? Seems like a brilliant programmer, but for whatever reason that wasn't enough.

It's not clear whether they actually hired anyone for the position (there are contradictory opinions in this thread as to whether or not Google is hiring at all right now).

Possibly meaningless anecdotal evidence: I know a number of people who have had internship offers from Google in the last couple months. I don't think any of them accepted though, so maybe they aren't paying as well as they used to. Also, I don't know what hiring interns says about hiring regular employees.

Re: My Job Interview at Google

#77
post #67
post #58

Earlier quoted context omitted.

f * f gives you 25 boxes, number 11, 12, ... 15, 21,...25...55. Assign 3 each of 21 of those to 1..7. If f * f doesn't fall into one of those 21 boxes, repeat until it does.

Runtime: O(infinity)?

Technically speaking, yes.

But, if you want to uniformly map a random number from set X to set Y where (IIRC) lcm(|X|, |Y|) != |X|, it seems you need an infinite worst-case running time.

Here's an informal proof that you can't have a finite upper bound to the number of iterations. After n iterations, you have |X|^n possible outcomes. But, since lcm(|X|, |Y|) != |X|, |X|^n cannot be divided evenly by |Y| (since its factors are the same). So some outcomes in Y must be more likely than others.

(This is not nearly complete, but hopefully it's enough to show how it might be right.)

Of course, in practice it is highly unlikely that you will get past more than a couple iterations before determining an outcome.

Re: My Job Interview at Google

#78

Isn't this level of interviewing kind of excessive and time-expensive? If I were Google, I would do the following: 1) Have the first interviewer be the best/most-appropriate interviewer for the position (manager, lead dev, whatever). Have them write down in a sealed envelope a "hire" or "no hire" statement after the interview. 2) At the end of the assorted interviews, measure how often the first interviewer is correc…

Maybe there is a secondary objective for excessive interviewing:

"Hazing is often used as a method to promote group loyalty and camaraderie through shared suffering (male bonding in fraternities), either with fellow participants, past participants or both."

Re: My Job Interview at Google

#79

Could anyone point me on how to solve this(either a solution or preferrably a pointer on how to get to it): "Q: 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." First I thought it was simple but the I got stuck, maybe I'm just tired. No matter how I twsit and turn it I seem to get only an even distribution over 5 numbers.

Observe the following lookup table, which is a 5x5 matrix.

12345 67123 45671 23456 7RRRR

R means "reroll".

Constant time execution in average case. Mathematically provable that it is as unbiased as your rand5() function. Technically not guaranteed to terminate but if you dock me points for that you're technically not guaranteed to survive to the end of the interview, are you.

Re: My Job Interview at Google

#80
post #68

Could anyone point me on how to solve this(either a solution or preferrably a pointer on how to get to it): "Q: 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." First I thought it was simple but the I got stuck, maybe I'm just tired. No matter how I twsit and turn it I seem to get only an even distribution over 5 numbers.

Generate two random numbers with your rand5 function, let them be the two digits of your base 5 number. Each number from 0-24 has a 1/25 chance of being picked. If the number is greater than 6 throw it away and repeat, otherwise you have your random number.

Works, but not as efficient as possible. Look at patio11's solution; you only need to throw it away and repeat if it's >= 21. Otherwise you can just take n mod 7.
Post reply on HN