directory
Version:
v0.0.0-...-9b92ec5
Opens a new window with list of versions in this module.
Published: Jan 3, 2021
License: MIT
Opens a new window with license information.
README
¶
给定一个含有 **n **个正整数的数组和一个正整数 **s ,找出该数组中满足其和 ≥ s 的长度最小的 连续 子数组,并返回其长度。**如果不存在符合条件的子数组,返回 0。
示例:
**输入:**
s = 7, nums = [2,3,1,2,4,3] **输出:**2 **解释:**子数组
[4,3] 是该条件下的长度最小的子数组。
进阶:
- 如果你已经完成了 O(n) 时间复杂度的解法, 请尝试 O(n log n) 时间复杂度的解法。
Directories
¶
Click to show internal directories.
Click to hide internal directories.