Interview Question

Quantitative Developer Interview

-Atlanta, GA

Bank of America

How to measure 9 minutes using only a 4 minute and 7 minute hourglass


Interview Answers

17 Answers


Start both timers together. When the 4 minute timer is done, flip it. 7 minute timer will have 3 minutes left. When the 7 minute timer is done, the 4 minute timer will have 1 minute left. Now you can count to 9 minutes by simply leaving the 4 minute to expire (1 min), flip it and let it expire (4 min), flip it again and let it expire (4 min). 1 + 4 + 4 = 9

J on


The key is understanding that you will have to use the two hourglasses together. Since this problem could be asked in many ways using different values for the hourglasses and the total amount of time, it's more important to understand how you use the tools rather than memorize a specific example. The question is used to determine those who can apply their knowledge to solve problems vs. those who memorize answers "from the book". Start both timers. After four minutes, the four-minute timer will have expired and the seven-minute timer will have three minutes remaining. Flip the four minute timer over. After seven minutes, the seven-minute timer will have expired and the four-minute timer will still have one minute left. Flip the seven-minute timer over. After eight minutes, the four-minute timer will have expired for the second time. The seven-minute timer will have accumulated one minute after it's last flip. Flip over the seven-minute timer and when it expires nine minutes will have elapsed. For extra measure, you can always throw in something like, "assuming the timers can be flipped over nearly instantly..."

Tim on


Anonymous on


The gist of this problem is that the only way to get an exact time is by having an hourglass empty out completely when you declare 9 minutes are reached. So let's take a holistic approach: the most time we can count using ONE of the hourglasses is 8 minutes: by starting the 4-minute hourglass, flipping it, then letting it go for another 4-minutes. Let's say we start both the 4-minute and the 7-minute hourglass at the same time. The 7-minute hourglass runs out before 8-minutes are up, so we flip it. When 8-minutes are up (measured by the 4-minute hourglass), we know 1 minute worth of sand has deposited since the 7-minute hourglass was flipped. So now flip that sand upside and down and let it drain completely, and we've reached 9 minutes.

James on


1st timer 2nd timer time count 4 7...................start both timers 3 6................. 1min 2 5..................2mins 1 4..................3mins 0(flip) 3..................4mins completed 4 3..................4mins(assuming flip takes no time ideally) 3 2..................5mins 2 1..................6mins 1 0(flip)..........7mins 1 7..................7mins(again ideal flip) 0 6..................8mins(flip 2nd timer to count 1min) 0(as it is) 7..................9mins...

Prawesh on


start 7 and 4 , flip 4 while 4 is gone but 7 is working , when 7 is gone , we have 1 min in 4 glass , start the timer , do 4 glass twice to count another two 4 mins : 1+ 4+ 4=9 4-4, 7-4 4 4-3 7-3 3 1-1 start timer 4 4 end timer

henry on


Since this situation test our mental fortitude and problem solving skills, can we start by opening the lids and emptying the sand from the 4 min. Pour the sand from the 7 into the empty 4 so you are left with three. Poor out that three into a pile and fill the 7 min with the remains sand and repeat to get another three. So now you have two pile of three min sand for a total of 6. Fill up the 4 min and add the 2 pile of three min sand into the 7 min hour glass to have exactly 9 min.

Laze on


Actually, I agree with #T$. Ultraman and d-bag, the goal is to get the job done the most efficient and accurate way. The original question says it has to get done within 9 minutes as well. So you turn the 7 min timer over. While the seven minute timer is going, you take a measurement of the length of the 4 min timer, with the width of your thumb. Whatever number of thumb widths it is, divide it by 2 and that will (very accurately) give you the half way point on the hourglass which will equal to 2 minutes. Once the seven minute hourglass is done, flip the 4 minute timer. Once the 4 minute timer hits the halfway point you marked, you accurately measured 9 minutes.

jocean on


Pls, i would like to get a solution to this question. If 4 boys move 12bags in 4 mins. How many boys will it take to move 36 bags in 8mins

Festus O on


Put the 4 minute timer on its side. Once the sand has stopped flowing, start the 7 minute timer. This will be 9 minutes 😅

Anonymous on


ultraman: all measurement systems and techniques are have an inherent accuracy and precision (or repeatability and reproduceability), so the important thing is to understand the level of accuracy and precision required, and know which technique will meet the level required. The most important thing in business is not running off to do the task you've been asked with a tool you have handy, but understanding the reason for completing the task, and knowing how the output from your work will be used by others, and how the accuracy and precision will impact of others down the value chain.

rd on


Dodging the question never works, rd. Tim is correct.

d-bag on


JDizz on


Set 4 minute timer to ring at teo minutes. Set seven minute timer. When it goes off , nine minutes will have passed. If you can not set the four monutes to go off after two minutes, set the sevem minute timer when the four minute is at the half way mark.



bluescrubbie on


By trying unsuccessfully to show how smart he is, T$ flunked the interview question. The task is to measure nine minutes, not to guess.

ultraman on


I think you made this much more complicated then it needed to be. Just flip the 7 minute hour glass, when it is done, flip the 4 minute, when you see the four minute is half way done you have 9 minutes, 7 + 2 = 9. Much easier yes?!

T$ on

One or more comments have been removed.
Please see our Community Guidelines or Terms of Service for more information.

Add Answers or Comments

To comment on this, Sign In or Sign Up.