gdsc-gvp / Problem-Solving

A place where you can learn and practise various Problems and algorithms
MIT License
10 stars 20 forks source link

Trapping Rain problem #64

Closed pranshu98 closed 3 years ago

pranshu98 commented 3 years ago

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining. Example 1: Input: height = [0,1,0,2,1,0,1,3,2,1,2,1] Output: 6 Explanation: The above elevation map (black section) is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped.

Example 2: Input: height = [4,2,0,3,2,5] Output: 9

Related Issue

Closes: #[issue number that will be closed through this PR]

Describe the changes you've made

Give a clear description what modifications you have made

Type of change

What sort of change have you made:

Programming language

Screenshots(optional)

Original Updated
original screenshot updated screenshot
tireless-22 commented 3 years ago

This code is copied from internet

pranshu98 commented 3 years ago

how you can say that

On Wed, 6 Oct 2021 at 08:03, Naveen Karthik @.***> wrote:

This code is copied from internet

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gdsc-gvp/Problem-Solving/pull/64#issuecomment-935288894, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMOFSB5MC57UTT2QWVUTBTUFOYMXANCNFSM5FLYLK2Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- pranshu jain

pranshu98 commented 3 years ago

this is most common problem and the solution can match . how you can say it is copied from a source

On Wed, 6 Oct 2021 at 11:19, pranshu jain @.***> wrote:

how you can say that

On Wed, 6 Oct 2021 at 08:03, Naveen Karthik @.***> wrote:

This code is copied from internet

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gdsc-gvp/Problem-Solving/pull/64#issuecomment-935288894, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMOFSB5MC57UTT2QWVUTBTUFOYMXANCNFSM5FLYLK2Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- pranshu jain

-- pranshu jain