parent
8d1c4d65ff
commit
69441475c6
|
|
@ -422,7 +422,8 @@ class Solution {
|
||||||
|
|
||||||
单调栈法
|
单调栈法
|
||||||
```java
|
```java
|
||||||
public int trapMonoStack(int[] height){
|
class Solution {
|
||||||
|
public int trap(int[] height){
|
||||||
int size = height.length;
|
int size = height.length;
|
||||||
|
|
||||||
if (size <= 2) return 0;
|
if (size <= 2) return 0;
|
||||||
|
|
@ -463,6 +464,7 @@ class Solution {
|
||||||
|
|
||||||
return sum;
|
return sum;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Python:
|
Python:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue