Leetcode 42. Trapping Rain Water

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.
Input: height = [4,2,0,3,2,5]
Output: 9

--

--

--

CS new grad, 6 years experience related to supply chain management. Located in Bay area

Love podcasts or audiobooks? Learn on the go with our new app.

AWS integration to Algorand Blockchain using Reach

Using FastAPI to Build Python Web APIs — Real Python

Using FastAPI to Build Python Web APIs – Real Python

I tell you a secret: Provide Database credentials to an ECS Fargate task in AWS CDK

Design or Architecture Pattern?

Tanner’s Lambda Labs Experience

Exception Handling in Java

Azure Key Vault and Keeping Application Configurations Secure and Secret

Breaking into the industry: My Journey to becoming a Software Engineer — Pomodoro Technique

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gary Chiang

Gary Chiang

CS new grad, 6 years experience related to supply chain management. Located in Bay area

More from Medium

Some important points regarding Array Data Structure During Placement Interview

Must-Do Coding Questions

The 6 most common causes of runtime errors and how to fix them

All Possible Full Binary Trees Solution | LeetCode-894: Medium | JavaScript Implementation