# 手指滑动特效

2016/08/05 00:51

2013/01/24 18:46

0
0

2019/10/10 15:39

## Sliding Window

sliding window: 解决数组/字符串的子元素问题，它可以将嵌套循环问题，转换为单循环问题，降低时间复杂度. 最简单的sliding window问题：给定一个整数数组，计算长度为 k 的连续子数组的最大总和。 int maxSum(vector<int>& arr, int k){ int max_sum = 0; for(int i = 0; i < k; ++i) max_sum += a...

0
0

2013/01/24 17:36

0
0

2013/01/24 17:38

0
0

2016/02/26 11:48

0
1
2015/08/10 14:57

## Sliding Window Maximum

# 题目 Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position. For example, Given nums = [1,3,-1,-3,5,3,6,7], and k = 3. Wind...

0
0

2013/01/26 22:37

0
0

2015/07/18 14:13

## Sliding Window Maximum

Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position....

0
0

1 评论
5 收藏