MEDIUMasked at 2 companies

Pour Water

A medium-tier problem at 48% community acceptance, tagged with Array, Simulation. Reported in interviews at Airbnb and 1 others.

Founder's read

Pour Water is the kind of problem that sounds simple until you code it and realize the simulation is way harder than the problem statement suggests. Airbnb and Oracle both ask it, and it's one of those medium-difficulty traps where the acceptance rate hovers around 48 percent because candidates mishandle the order of operations or miss edge cases in the water-flow logic. You need to simulate liquid pouring into a 2D elevation map and figure out where it settles. It's not hard conceptually, but the implementation can derail you if you don't nail the simulation step by step.

Companies asking
2
Difficulty
MEDIUM
Acceptance
48%

Companies that ask "Pour Water"

If this hits your live OA

Pour Water is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Built by an engineer who got tired of watching his cohort grind for six months and still get filtered at the OA stage.

Get StealthCoder
What this means

The trick is understanding that water doesn't just fall straight down. It flows left and right before it settles, and the order matters. Most candidates write a solution that works on simple test cases but breaks when water needs to flow around obstacles or when multiple "buckets" form at different heights. The obvious approach of checking the lowest neighbor first often fails because water can flow past a lower position to settle in a deeper trap. You need to simulate the water's actual path: drop it, let it roll horizontally until it hits a wall or obstacle, then drop it again. If you hit a wall mid-flow, it can bounce back and fill differently. This is why many first attempts get stuck on medium test cases. If you blank during the live assessment, StealthCoder pulls up a working simulation that handles the directional flow logic correctly, so you can paste a solution instead of debugging under pressure.

Pattern tags

The honest play

You know the problem. Make sure you actually pass it.

Pour Water recycles across companies for a reason. It's medium-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Built by an engineer who got tired of watching his cohort grind for six months and still get filtered at the OA stage. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Pour Water interview FAQ

Is Pour Water really asked at Airbnb and Oracle, or is it old?+

Yes, both companies report asking it. It's not a bleeding-edge problem, but it's stable in their interview rotation. The 48 percent acceptance rate suggests it's actively used to filter candidates who can't handle multi-step simulation under time pressure.

What's the trick that makes this harder than it looks?+

Water flows horizontally before falling, and the order of left-right checks determines where it ends up. Many candidates drop water vertically first, miss the horizontal flow logic, and fail hidden test cases where water should roll around an obstacle before settling.

Do I need dynamic programming or can I just simulate?+

Pure simulation is fine. You don't need DP. The problem is about correctly modeling the physics of water flow, not optimizing substructure. The challenge is getting the simulation right, not the algorithmic paradigm.

How much of the interview is this problem versus other things?+

Unknown from the data, but it's asked by only 2 companies in the record. If you're interviewing at one of them and this hits your assessment, nailing it signals strong attention to detail and control of edge cases.

Should I memorize a solution or understand the pattern?+

Understand the pattern. The simulation logic is the pattern: water falls, rolls left and right until blocked, then falls again. Once you see the flow, you can code it. Memorizing exact solutions won't help if the elevation map changes shape in the real assessment.

Want the actual problem statement? View "Pour Water" on LeetCode →

Frequency and company-tag data sourced from public community-maintained interview-report repos. Problem, description, and trademark © LeetCode. StealthCoder is not affiliated with LeetCode.