InterviewGPT
Robot Partner
Home
Modules
Blogs
Pricing
FAQ
Sign In
Blogs
Coding
Trapping Rain Water
Search
The Question
Coding
Trapping Rain Water
Given n non-negative integers representing the heights of an elevation map where each bar has width 1, compute how much water can be trapped between the bars after it rains.
Java
Two Pointers
January 30, 2026