You are viewing a single comment's thread. Return to all comments →
pattern is everything (for pythoholics)
def hourglassSum(arr): li=[]
def hourglassSum(arr):
li=[]
for i in range(len(arr)-2): for j in range(len(arr)-2): li.append(sum(arr[i][j:j+3]+arr[i+2][j:j+3])+arr[i+1][j+1]) return max(li)
Seems like cookies are disabled on this browser, please enable them to open this website
2D Array - DS
You are viewing a single comment's thread. Return to all comments →
pattern is everything (for pythoholics)