1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-13 19:31:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

add leetcode problem-cn part2

This commit is contained in:
2022-03-27 20:38:29 +08:00
parent 5a4fa6db12
commit 0fc7f4b734
1617 changed files with 134637 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<p>给定一个数组 <code>nums</code> 和滑动窗口的大小 <code>k</code>,请找出所有滑动窗口里的最大值。</p>
<p><strong>示例:</strong></p>
<pre><strong>输入:</strong> <em>nums</em> = <code>[1,3,-1,-3,5,3,6,7]</code>, 和 <em>k</em> = 3
<strong>输出: </strong><code>[3,3,5,5,6,7]
<strong>解释:
</strong></code>
滑动窗口的位置 最大值
--------------- -----
[1 3 -1] -3 5 3 6 7 3
1 [3 -1 -3] 5 3 6 7 3
1 3 [-1 -3 5] 3 6 7 5
1 3 -1 [-3 5 3] 6 7 5
1 3 -1 -3 [5 3 6] 7 6
1 3 -1 -3 5 [3 6 7] 7</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<p>你可以假设 <em>k </em>总是有效的在输入数组不为空的情况下1 &le; k &le;&nbsp;输入数组的大小。</p>
<p>注意:本题与主站 239 题相同:<a href="https://leetcode-cn.com/problems/sliding-window-maximum/">https://leetcode-cn.com/problems/sliding-window-maximum/</a></p>