Qualcomm interview question

There is a body of water that starts with 1 square unit, and doubles in size every day (2 units after 2 days, 4 units after 4 days). It takes 100 days to fill up. How many days would it take to fill if you started with 2 square units?

Interview Answers

Anonymous

7 Jun 2010

100 - 1 = 99 days

11

Anonymous

8 Feb 2013

Starting with 2 square units at time t=0 is like 1 square unit at t = 1. [this logic is the key to answering the question]. Now let's do the first few cases. t = 0: size = 1+1 = 2 t = 1: size = 2(1+1) = 2+2 = 4 = f(2) in the 1 unit case. Pretty easy to see it only requires 1 time period less from here. The OP was right.

2

Anonymous

24 Jan 2012

This question is phrased incorrectly. I think you meant "4 units after 3 days". Which makes your answer wrong as well. This is not helpful at all.

2

Anonymous

17 Dec 2014

1 day less that is 99 days.

Anonymous

22 Mar 2016

It is still 100 days. Starting from 2^0, and going all the way to 2^100, the reservoir has a capacity of 2^101 - 1 units. Now in the second case, starting from 2^1, in 99 days there will be 2^101-2 units of water in the reservoir, which is one unit short of the capacity of the reservoir. So we need the 100th day to fill it up!

Anonymous

21 Apr 2012

if you start with 1sq unit - lets say you end up with 'x' amount to fill up - takes 100 days if you start with 2 sq unit - you will have to fill up '2x' amount thus it will take - 200 days.