akshitagit / akshitagit/JavaScript

RAIN WATER SAVING-INTERVIEW QUESTION(FAANG)

オープン
#38 コメント 5 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。