DIY: Trapping Rainwater
Solve the interview question "Trapping Rainwater" yourself in this lesson.
We'll cover the following
Problem statement
We have n
non-negative integers representing an elevation map where the width of each bar is 1
. Compute how much water it can trap after raining.
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.