
牛客刷题
我想改个名字
这个作者很懒,什么都没留下…
展开
-
牛客题霸-算法篇 NC41 最长无重复子串
代码: class Solution: def maxLength(self , arr ): new = [] number = [] maxlen = 0 i = 0 while i<len(arr): if arr[i] not in new: new.append(arr[i]) number.append(...原创 2021-03-30 11:09:36 · 167 阅读 · 0 评论 -
牛客题霸-算法篇 NC19 子数组的最大累加和问题
代码: class Solution: def maxsumofSubarray(self , arr ): temp = 0 resmax = arr[0] for num in arr: temp = max(temp+num, num) resmax = max(temp, resmax) return resmax原创 2021-03-29 22:01:40 · 153 阅读 · 0 评论