Medium Problemsgridcounting

Water Overflow

Water is poured into the top glass of a triangular pyramid of identical glasses stacked n rows deep. Once a glass fills, half of any further overflow spills onward to each of the two glasses directly below it. Given the amount poured and a target glass, find how much water that glass ends up holding.

Do this lesson first: climbing stairs

The full breakdown and animated table for this problem are still being written. In the meantime, run the four questions on it yourself — that is the whole exercise.