代码重构 【Github Actions】

This commit is contained in:
github-actions[bot]
2021-07-23 15:44:19 +00:00
parent c79cac3d9c
commit f671c90754
94 changed files with 1609 additions and 2111 deletions

View File

@@ -1,8 +1,8 @@
> 如果阅读时发现错误或者动画不可以显示的问题可以添加我微信好友 **[tan45du_one](https://raw.githubusercontent.com/tan45du/tan45du.github.io/master/个人微信.15egrcgqd94w.jpg)** ,备注 github + 题目 + 问题 向我反馈
> 如果阅读时发现错误或者动画不可以显示的问题可以添加我微信好友 **[tan45du_one](https://raw.githubusercontent.com/tan45du/tan45du.github.io/master/个人微信.15egrcgqd94w.jpg)** ,备注 github + 题目 + 问题 向我反馈
>
> 感谢支持该仓库会一直维护希望对各位有一丢丢帮助
>
> 另外希望手机阅读的同学可以来我的 <u>[**公众号袁厨的算法小屋**](https://raw.githubusercontent.com/tan45du/test/master/微信图片_20210320152235.2pthdebvh1c0.png)</u> 两个平台同步,想要和题友一起刷题,互相监督的同学,可以在我的小屋点击<u>[**刷题小队**](https://raw.githubusercontent.com/tan45du/test/master/微信图片_20210320152235.2pthdebvh1c0.png)</u>进入。
> 另外希望手机阅读的同学可以来我的 <u>[**公众号袁厨的算法小屋**](https://raw.githubusercontent.com/tan45du/test/master/微信图片_20210320152235.2pthdebvh1c0.png)</u> 两个平台同步,想要和题友一起刷题,互相监督的同学,可以在我的小屋点击<u>[**刷题小队**](https://raw.githubusercontent.com/tan45du/test/master/微信图片_20210320152235.2pthdebvh1c0.png)</u>进入。
#### [209. 长度最小的子数组](https://leetcode-cn.com/problems/minimum-size-subarray-sum/)
@@ -14,12 +14,10 @@
示例
> 输入s = 7, nums = [2,3,1,2,4,3]
> 输入s = 7, nums = [2,3,1,2,4,3]
> 输出2
> 解释子数组 [4,3] 是该条件下的长度最小的子数组
#### 题目解析
滑动窗口**就是通过不断调节子数组的起始位置和终止位置进而得到我们想要的结果**滑动窗口也是双指针的一种
@@ -28,14 +26,10 @@
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210321131617533.png)
好啦该题的解题思路我们已经了解啦下面我们看一下代码的运行过程吧
![](https://img-blog.csdnimg.cn/2021032111513777.gif)
#### 题目代码
Java Code:
@@ -55,7 +49,7 @@ class Solution {
sum -= nums[i];
i++;
}
}
}
return windowlen == Integer.MAX_VALUE ? 0 : windowlen;
}
@@ -84,7 +78,7 @@ public:
Python3 Code:
```python
```python
from typing import List
import sys
class Solution:
@@ -99,7 +93,7 @@ class Solution:
windowlen = min(windowlen, j - i + 1)
sum -= nums[i]
i += 1
if windowlen == sys.maxsize:
return 0
else:
@@ -124,4 +118,4 @@ class Solution {
return windowlen == Int.max ? 0 : windowlen
}
}
```
```