Get Mystery Box with random crypto!

Day 35 Question: Rain water trapping in C++ Given *n* non-neg | Competitive programming questions

Day 35 Question: Rain water trapping in C++

Given *n* non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
Input: [0,1,0,2,1,0,1,3,2,1,2,1]

Output: 6


Before solving this problem, please take a look at “Container with most water (https://www.prodevelopertutorial.com/find-the-container-with-most-water-explanation-with-diagram-and-solution-in-cpp-language/)” problem. There I have explained in detail, how two pointers work.

Solution:
https://www.prodevelopertutorial.com/rain-water-trapping-in-c/