akshitagit / akshitagit/Python

RAIN WATER SAVING-INTERVIEW QUESTION(FAANG)

Aberta
#65 5 comentários 0 reações 1 responsável Reivindicada por @PoojaPatel21 Ver no GitHub
algorithms datastructures DSA good first issue hacktoberfest hacktoberfest2020 hactoberfest INTERVIEW-QUESTION
Linguagem predominante
Python
Estrelas
124
Forks
109
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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](https://user-images.githubusercontent.com/57909583/94303605-b88ce580-ff8b-11ea-99b7-f05fef83dcd6.png)

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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.