Please solve the programming task below using a self-contained code snippet in a markdown code block.

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.
 
Please complete the following python code precisely:
```python
class Solution:
    def trap(self, height: List[int]) -> int:
```