Google Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
1
of 1 vote

See if this is correct
Every year the amount will double.
So (log(richest person amount)base2) + 1

- Anand June 29, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Essentially that's what I answered
So the amount I have at the end of every year will be doubled...
So it forms a GP and the sum of the GP is = money of riches person
i.e. sum = 2^n - 1
so money = 2^n -1
we can calculate the n from here.

- erappy June 29, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

@erappy: why r u summing up the terms in GP?
After year n, the amount is 2^n. So need to find n for which 2^n is > richest person's amount, which is shown by Anand.

- Anonymous June 29, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

No need to sum up, its the Nth term > money

- erappy June 29, 2010 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

53B according to Forbes,

10 yrs -> 1 K
20 yrs -> 1 M
30 yrs -> 1 B
you need another 6 years to pass 56B.

that's a total of 36 years

- Anonymous June 30, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes
- canmpuppala January 30, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

This assumes the richest man's investment doesn't grow. This is one of those questions which require creativity so you might want to build in an interest rate on his money.

- Anon August 15, 2012 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

Heh heh ... not bad I got 37 years before reading this thread, we're all roughly in the same ballpark.

- Bullocks September 06, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

Make sure the richest man also has not invested in the same bank :P

- Anonymous October 30, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

suppose the richest has 40B$, it takes about 48 years. am I right?

- Anonymous June 29, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Seems like a horrible question for a programming job.

- Anonymous June 30, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

never coz i am not the only customer of that bank

- Anonymous July 01, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

nod!

- q August 12, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

I bet the thing they're trying to find here is if you know what 2^32 is. What I'd say in an interview is:
"Well, I don't know precisely how much money the richest guy has, but it's in the 2-digit billions.
I know 2^32 is 4.3 billion, *2 is 8.6 *2 is 17.2 *2 is 34 *2 is 68 and change, so probably circa 36.

- SomeGuy July 01, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

(amount * num.of year) * 2 -- since it doubles every year.
so if the riches man has $60B, it takes more than 30B years to be the riches person

- someDude July 21, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

a=1
b=0
while(a<rich_amount)
      {
        a=2*a;
        b++;
      }
printf("no of yrs %d",b);

- kriz October 03, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Hey, you need 'ye' 30/36/40/42/48 whatever years to cross today's richest man. That's unfair because you never know how much wealth today's richest man can gather in the next 'ye' years.......... You cannot compare x and y, where x is present value and y is the value 'ye' years from now. Need to take the present value of y...(discounting it with risk free interest)
So, answer if you find X money after ye years, discount it by 6% for 'ye' years... That way you need few more years.....

- shekhar2010us February 10, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Never
No bank will open your account or any business contract in 1$

That only I can ans for this UNIQUE qus..!! :)

- PKT September 17, 2011 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More