akshitagit / akshitagit/Python

RAIN WATER SAVING-INTERVIEW QUESTION(FAANG)

オープン
#65 コメント 5 件 リアクション 0 件 担当者 1 名 @PoojaPatel21 が担当を希望しています GitHub で見る
algorithms datastructures DSA good first issue hacktoberfest hacktoberfest2020 hactoberfest INTERVIEW-QUESTION
主要言語
Python
スター
124
フォーク
109
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/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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。