akshitagit / akshitagit/JavaScript

RAIN WATER SAVING-INTERVIEW QUESTION(FAANG)

Abierto
#38 5 comentarios 0 reacciones 1 asignado Reclamado por @shiv-ani-singh Ver en GitHub
good first issue Hacktoberfest hacktoberfest2020 INTERVIEW-QUESTION Javascript
Lenguaje dominante
JavaScript
Estrellas
90
Forks
106
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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/94303855-1faa9a00-ff8c-11ea-89f6-20f3e2c942a2.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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.