Reference: LeetCode
Difficulty: Hard

## Problem

Given an m x n matrix of positive integers representing the height of each unit cell in a 2D elevation map, compute the volume of water it is able to trap after raining.

Note: Both m and n are less than 110. The height of each unit cell is greater than 0 and is less than 20,000.

Example:

## Analysis

### Priority Queue

Explanation: Animation

Time: $O(MN\log{(MN)})$
Space: $O(MN)$

Comment
Junhao Wang
Hi, I was a master student at USC studying Computer Science.