Initialize DP Table as - 1
for i in range ( 50 ) : NEW_LINE INDENT for j in range ( 50 ) : NEW_LINE INDENT for l in range ( 50 ) : NEW_LINE INDENT dp [ i ] [ j ] [ l ] = - 1 ; NEW_LINE DEDENT DEDENT DEDENT return calculate ( 0 , 1 , n , k ) ; NEW_LINE