Fundamental Algorithms8 sections · 291 units
Open in CourseQuiz: Trapping Rain Water
Test your understanding
Check Your Understanding
In the two-pointer approach for trapping rain water, why can you safely process the shorter side?
- A.Shorter buildings hold more water
- B.The taller side never contributes to water
- C.Water level at the shorter side is bounded by it, not the other side
- D.It reduces time complexity