Skip to content

209. Minimum Size Subarray Sum#47

Open
skypenguins wants to merge 1 commit into
mainfrom
leetcode/arai60/problem-209
Open

209. Minimum Size Subarray Sum#47
skypenguins wants to merge 1 commit into
mainfrom
leetcode/arai60/problem-209

Conversation

@skypenguins

Copy link
Copy Markdown
Owner

209. Minimum Size Subarray Sum

次回予告: 213. House Robber II

@skypenguins skypenguins self-assigned this Jul 13, 2026
Comment thread memo.md
j = 0
current_sum = 0
min_length = float("inf")
while j < len(nums):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for j in range(len(num)):

のほうがシンプルになると思いました。

Comment thread memo.md
def minSubArrayLen(self, target: int, nums: List[int]) -> int:
prefix_sums = [0] * (len(nums) + 1)
for i in range(1, len(nums) + 1):
prefix_sums[i] = prefix_sums[i-1] + nums[i-1]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらのコメントをご参照ください。
mt2324/leetcode#2 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants