Skip to content

Trapping Rain Water problem not available. #2166

@raunakbhupal

Description

@raunakbhupal

A common Google interview question known as the Trapping Rain Water problem where given an array of some non negative integers which represents the height of the block. Considering the width of each block to be 1 we need to find how much water could be trapped between the blocks during the rainy season.

  • Trapping Rain Water Problem

Test Case:

Consider an array of size 6 and the heights of blocks be {3,0,0,2,0,4}
Thus the output should be 10.
Which accounts for the total trapped water of 3+3+1+3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions