Back to Question

How do you trap rain water given an elevation map?

Question Explain

Calculate the total amount of water that can be trapped after raining given an array of non-negative integers representing heights. This tests two-pointer and stack-based approaches.

Start Trying This Question Simulation