Back to course home
0% completed
Vote For New Content
Just 1 line in for loop, very simple
usha_sahu2000
Jan 29, 2024
class Solution: def findMaxSumSubArray(self,k, arr): # TODO: Write your code here maxsum=[] for i in range(0,len(arr)-k+1): maxsum=max(maxsum,arr[i:i+k],key=sum) return sum(maxsum)
2
0
Comments
Comments
On this page