Skip to content

RAIN WATER SAVING-INTERVIEW QUESTION(FAANG) #65

Open

Description

@akshitagupta15june

AKSHITA has created an elevated roof. She wants to know how much water can she save during rain.

Given n non negative integers representing the elevation map where width of every bar is 1, Find the maximum water that she can save.

Explanation for the Sample input Testcase:
image

Elevation Map
Input Format

First line contains an integer n. Second line contains n space separated integers representing the elevation map.
Constraints

1 <= N <= 10^6
Output Format

Print a single integer containing the maximum unit of waters she can save.
Sample Input

10
0 2 1 3 0 1 2 1 2 1

Sample Output

5

Activity

  1. akshitagupta15june commented on Sep 25, 2020

    @akshitagupta15june
    MemberAuthor

    ADD IN INTERVIEW QUESTION REPO

  2. PoojaPatel21 commented on Sep 26, 2020

    @PoojaPatel21

    hey, @akshitagupta15june can you assign this to me?

  3. akshitagupta15june commented on Sep 26, 2020

    @akshitagupta15june
    MemberAuthor

    YES I AM ASSIGNING IT TO U
    ADD IN ALGORITHMS FOLDER

  4. kanikarajpal commented on Oct 11, 2022

    @kanikarajpal

    Can you please assign this to me?

  5. Code-Techy commented on Oct 25, 2022

    @Code-Techy

    Greetings , @akshitagupta15june

    I was looking for a repository to contribute to open source and found this one.
    Can you assign this to me? I'm familiar with the CPP Programming . and I would love to do it..

    -Regards, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions