akshitagit / akshitagit/JavaScript

RAIN WATER SAVING-INTERVIEW QUESTION(FAANG)

未關閉
#38 5 則留言 0 個 reaction 已指派 1 人 已被 @shiv-ani-singh 認領 在 GitHub 檢視
good first issue Hacktoberfest hacktoberfest2020 INTERVIEW-QUESTION Javascript
主要語言
JavaScript
星號
90
分支
106
PR 合併指標
30 天內沒有已合併 PR

描述

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

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。