Interview Q&A / Aptitude

BeginnerQuick answer1 min readUpdated 3 Oct 2026

A pipe normally fills a tank in 8 hours, but because of a leak it takes 10 hours. How long would the leak take to empty a full tank?

SHORT ANSWER

40 hours. Leak rate = normal rate - actual rate = 1/8 - 1/10 = 1/40 of the tank per hour. With 40 units: the pipe adds 5, the net is 4, so the leak removes 1 unit per hour.

Explain it simply

The leak is the difference between how fast the tank should fill and how fast it actually fills. Find both rates, subtract, and the leftover is the leak. Then the leak alone empties a full tank in 1 divided by its rate.

Example

Question: Normally 8 hours to fill; with a leak, 10 hours. Leak alone empties in?

  1. Tank = LCM(8, 10) = 40 units.
  2. Pipe alone = 5 units/h. Pipe with leak = 4 units/h.
  3. Leak = 5 - 4 = 1 unit/h.
  4. Leak empties 40 units in 40 hours.

Shortcut: leak time = (a x b) / (b - a) = (8 x 10) / (10 - 8) = 40.

js
const a = 8, b = 10;
console.log((a * b) / (b - a)); // Output: 40

Check: 1/8 - 1/40 = 5/40 - 1/40 = 4/40 = 1/10, so the tank fills in 10 hours with the leak.

What to say in the interview

"The leak's rate is the normal filling rate minus the actual rate: one eighth minus one tenth, which is one fortieth. So it empties a full tank in 40 hours."

Common mistakes

  • Answering 2 hours (10 - 8).
  • Mixing up which rate is bigger: the normal rate must be the larger one.

#aptitude#pipes-cisterns

Related questions

Practise more Aptitude questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Aptitude quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.