What would you like to Propose?
Description
I would like to contribute the implementation of the Trapping Rainwater problem under src/main/java/com/thealgorithms/searches . It focus on computing how much water can be trapped between bars of different heights after raining.
Issue details
Problem Statement
Given an array of non-negative integers representing the elevation map where the width of each bar is 1, compute how much water it can trap after raining.
For Example :
Input : height = [4,2,0,3,2,5]
output : 9
Approach Implemented :
Optimized Two-Pointer Approach
Time Complexity - O(n)
Additional Information
No response