• + 0 comments

    python: def hourglassSum(arr): l=[] for i in range(1,5): for j in range(1,5): l.append(a[i-1][j-1]+a[i-1][j]+a[i-1][j+1]+ a[i][j]+ a[i+1][j-1]+a[i+1][j]+a[i+1][j+1]) return(max(l))