Qualcomm Interview Question: There is a body of water that... | Glassdoor

## Interview Question

Senior Systems Test Engineer Interview San Diego, CA

# 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?
Tags:
logic

7

100 - 1 = 99 days

Interview Candidate on Jun 7, 2010
2

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.

Jim on Jan 24, 2012
0

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.

Jigar on Apr 21, 2012
2

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.

Anonymous on Feb 7, 2013
0

1 day less that is 99 days.

BP on Dec 17, 2014
0

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!

Amirali on Mar 22, 2016