Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eee9662

Browse files
committed
Update stack_queue.md
1 parent 771983c commit eee9662

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎data_structure/stack_queue.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,14 @@ class Solution:
282282
return int(stack.pop())
283283
```
284284

285-
### [sliding-window-maximum]()
285+
### [sliding-window-maximum](https://leetcode.cn/problems/sliding-window-maximum/)
286+
> 给你一个整数数组 nums,有一个大小为 k 的滑动窗口从数组的最左侧移动到数组的最右侧。你只可以看到在滑动窗口内的 k 个数字。滑动窗口每次只向右移动一位。
287+
> 返回 滑动窗口中的最大值 。
288+
思路:这道题得想到一个数据结构,当滑动窗口一进一出,能够自动把最大值拱上来,只有最大堆了
289+
```python
290+
291+
292+
```
286293

287294

288295

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /