akshitagit / akshitagit/CPP

RAIN WATER SAVING-INTERVIEW QUESTION (FAANG)

オープン
#137 コメント 5 件 リアクション 0 件 担当者 1 名 @Maitryee-Choudhary が担当を希望しています GitHub で見る
algorithms C CPP good first issue hacktoberfest Hacktoberfest2020 interview-questions
主要言語
C++
スター
504
フォーク
436
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/94303318-3bfa0700-ff8b-11ea-8f96-3935df47aab0.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 を短くまとめたダイジェスト。