Live data from Hacker News

My Job Interview at Google

catonmat.net

101–110 of 114 posts

Re: My Job Interview at Google

#101
post #94
post #15

Earlier quoted context omitted.

Citation needed.

I thought it was on the front page http://www.webguild.org/2008/11/google-layoffs-10000-workers... Similar leaks are being posted every other day.

It seems today it got broader attention.

http://www.reuters.com/article/ousiv/idUSTRE4AO1LI20081125

http://www.forbes.com/afxnewslimited/feeds/afx/2008/11/25/af...

And everybody mentions WSJ as source but couldn't find the original, perhaps it's offline only.

Yeah, no mention of (mostly) not hiring but I am very sure of that, too.

Re: My Job Interview at Google

#102
post #77
post #67

Earlier quoted context omitted.

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 fa…

[deleted]

Re: My Job Interview at Google

#103
post #77
post #67

Earlier quoted context omitted.

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 fa…

since lcm(|X|, |Y|) != |X|, |X|^n cannot be divided evenly by |Y| (since its factors are the same)

Can you go into more detail about this part?

Re: My Job Interview at Google

#104
post #100

The "I got interviewed by Google" articles are getting old for me. I just don't care, and their process isn't that interesting anymore.

My interview at Google: First basic recruiter basic questions. Second part, call from Mountain View to London. They couldn't organize a VOIP line that didn't sound underwater. They tried calling again and the line was still bad. They proceeded anyway. I spent 5 minutes answering a basic question about deploying some changes across a thousand machines, then the interviewer mentioned he'd heard part of it, but how woul…

Recruiters' decisions have nothing to do with how you actually are as a candidate, but are usually made on somewhat spurious grounds. Apparently, this is also true at Google!

At least the blogger that is linked to got the tired "well uh we've decided you're good but you don't have enough experience hurrrrr" excuse instead of silent treatment.

To give them credit, they are probably shoveling through thousands of candidates, so it's very hard to actually give them all a proper chance, and there are positive consequences (narrow the pool) for cutting people out.

Re: My Job Interview at Google

#105
post #77

Earlier quoted context omitted.

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 fa…

since lcm(|X|, |Y|) != |X|, |X|^n cannot be divided evenly by |Y| (since its factors are the same) Can you go into more detail about this part?

Sure. Sorry, I didn't take the time to work this out on paper before posting or I would have realized that the condition itself is wrong. The condition lcm(|X|,|Y|) != |X| instead should be that |Y| has some prime factor that |X| does not.

Here is an explanation with the new condition:

Let p be any prime factor of |Y| that |X| does not have. It follows from Euclid's First Theorem[1] that p cannot divide |X|^n for any n [2]. Since every integer (> 1) has a unique prime factorization, it follows that |X|^n can't divide |Y|, because the prime p divides |Y| but not |X|^n.

[1] http://mathworld.wolfram.com/EuclidsTheorems.html [2] We are given that p does not divide |X|^1. Suppose that p also does not divide |X|^(n-1) for some n > 1. |X|^n = |X|^(n-1) * |X|^1, so by Euclid's First Theorem, if p divides |X|^n it must divide either |X|^(n-1) or |X|^1. We know it divides neither, so p does not divide |X|^n. By induction, this is true for all n > 0.

Re: My Job Interview at Google

#106
post #54
post #40

Earlier quoted context omitted.

Execute f 7 times, add all numbers, call that x. Then you do mod(x,7)+1, and you get a random number between 1 and 7. If the original function was unbiased, this one is going to be unbiased too.

This won't work. f gives 1 to 5. 7 * f gives 7 to 35. But 7 to 35 will not be evenly generated. Think about it: There are more ways to get a 20 than there are to get a 7 or a 35. Same thing with rolling 2 die.

Ok, a less elegant one then, but one that works for a reasonably simple reason. f gives 1 to 5, if it gives 5, try again, and so on, until you have a number from 1 to 4. Then, do that mod 2. You have a random binary digit, that's unbiased.

Now use that process to get 3 binary digits. You get a random number from 0 to 7. If the random number is 0, start again... eventually you'll get a number from 1 to 7, and all numbers have the same chances.

Re: My Job Interview at Google

#107
post #92

Earlier quoted context omitted.

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?

that's not very easy to do in a big corp environment. in a startup- it's a lot easier for both one being fired and the one doing the firing: being fired from a start-up can happen for many reason others than pure performance, where-as if one is fired from a bigger corporation that carries a bit more of a negative stigma with it. in addition firing in a company like google is expensive: there's three months of trainin…

Those are actually really good points... Hiring people is more expensive than saying, "Sure-- come on aboard. We'll see how you do!".

That being said, I'm still not convinced that 10 hours of interviewing is any better than 2 hours of interviewing in terms of predicting success/fit in an organization.

Re: My Job Interview at Google

#108

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.

Can't you just do this ?

    int rand7()
    {
        return (int)(7.0f * rand5() / 5.0f);
    }

Re: My Job Interview at Google

#109
post #108

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.

Can't you just do this ? int rand7() { return (int)(7.0f * rand5() / 5.0f); }

No -- I get zero hits for 4 and 7 with this approach.

Re: My Job Interview at Google

#110
post #109
post #108

Earlier quoted context omitted.

Can't you just do this ? int rand7() { return (int)(7.0f * rand5() / 5.0f); }

No -- I get zero hits for 4 and 7 with this approach.

Ok, just to limit my embarrassment, I've implemented an alternative solution -- though not as good as the others.

First convert rand5() to rand2(). The LSB from rand5() has a uniform distribution for the integers 0--3:

    int rand2()
    {
        int n = rand5();
        return n!=4 ? n & 1 : rand2();
    }
Now we simply build a three bit number:

    int rand7()
    {
        int n = rand2();
        n |= rand2() 
This gives the proper distribution as well, but it's not branch free, so really nothing new here.
Post reply on HN