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 19f3261

Browse files
add: array directory and 209
1 parent bc4ad81 commit 19f3261

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

‎array/main.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
################*******@Ziyodev*********######################
3+
#--------------- 209. Minimum Size Subarray Sum --------------#
4+
# start | 10:42
5+
# end | 11:01
6+
7+
# class Solution(object):
8+
# def minSubArrayLen(self, s, nums):
9+
# """
10+
# :type target: int
11+
# :type nums: List[int]
12+
# :rtype: int
13+
# """
14+
# i, j, pres, res = 0 , 0 , 0, len(nums) + 1
15+
16+
# while j < len(nums):
17+
# pres += nums[j]; j += 1
18+
# while pres >= s:
19+
# res = min(res, j - i)
20+
# pres -= nums[i]; i+= 1
21+
# return res if res != len(nums) + 1 else 0
22+
23+
24+
# target = 7
25+
# nums = [2,3,1,2,4,3]
26+
# target = 4
27+
# nums = [1,4,4]
28+
29+
# a = Solution()
30+
# print(a.minSubArrayLen(target, nums))

0 commit comments

Comments
(0)

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