██████╗ ██████╗ ██████╗ ███████╗ ███████╗███╗ ██╗ █████╗ ████████╗ ██████╗██╗ ██╗██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██╔════╝████╗ ██║██╔══██╗╚══██╔══╝██╔════╝██║ ██║██║ ██║ ██║██║ ██║█████╗ ███████╗██╔██╗ ██║███████║ ██║ ██║ ███████║██║ ██║ ██║██║ ██║██╔══╝ ╚════██║██║╚██╗██║██╔══██║ ██║ ██║ ██╔══██║╚██████╗╚██████╔╝██████╔╝███████╗ ███████║██║ ╚████║██║ ██║ ██║ ╚██████╗██║ ██║ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚══════╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
Learn · Earn · Connect
Practice Problem
Difficulty: Hard
Given an elevation map, compute how much water it can trap after raining.