Skip to content

Commit 69b3f60

Browse files
committed
add monotonic_stack_queue url
1 parent e19bb7d commit 69b3f60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

solutions/42. Trapping Rain Water.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
至少需要两次遍历,所以时间复杂度为O(n);至少开辟一个额外的数组,所以空间复杂度O(n)。
1717

18-
## 思路二、
18+
## 思路二、单调栈
1919

2020
这题的tag是stack,所以我们考虑用栈来解决。
2121

@@ -25,6 +25,7 @@
2525

2626
这样我们只需要遍历一次,时间复杂度还是O(n);空间复杂度O(n)
2727

28+
关于单调栈可以参考[我的总结](../algorithm/array/monotonic_stack_queue.md)
2829

2930
## 思路三、双指针
3031

0 commit comments

Comments
 (0)