Given an array of N non-negative integers arr[] representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
Cpp Program Code:
Here's the C++ code to find the length of the longest valid parenthesis substring: