Trapping Rain Water
Everything on SkillVeris tagged Trapping Rain Water — collected across the glossary, study notes, blog, and cheat sheets.
2 resources across 1 library
Interview Questions(2)
How Do You Solve the Trapping Rain Water Problem?
The Trapping Rain Water problem, given an array of bar heights, is solved optimally with a two-pointer approach in O(n) time and O(1) space: water trapped abov…
What is the Container With Most Water Problem?
The container with most water problem finds two vertical lines from an array of heights that, together with the x-axis, form the container holding the most wat…