Trapping Rain Water
Try to solve the Trapping Rain Water problem.
We'll cover the following
1 of 2
2 of 2
Understand the problem#
Let’s take a moment to make sure you’ve correctly understood the problem. The quiz below helps you check if you’re solving the correct problem:
Trapping Rain Water
1
What is the maximum amount of water that would be trapped for the following given input?
heights = [0, 1, 2, 0, 1, 3]
A)
7
B)
3
C)
6
D)
5
Question 1 of 30 attempted
Figure it out!#
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding of how to solve this problem.
Try it yourself#
Implement your solution in the following coding playground.
Python
usercode > main.py
Trapping Rain Water
Solution: Sum of Three Values
Solution: Trapping Rain Water