Initialize memoization table
for j in range ( MAX ) : NEW_LINE INDENT for k in range ( MAX ) : NEW_LINE INDENT memo [ j ] [ k ] = - 1 NEW_LINE DEDENT DEDENT return oSRec ( arr , 0 , n - 1 , Sum ) NEW_LINE