Making all possible horizontal cuts , one by one and calculating the sum of minimum invalid area for both the resulting pieces
for i in range ( 1 , b ) : NEW_LINE INDENT ans = min ( ans , minInvalidAreaUtil ( l , i ) + minInvalidAreaUtil ( l , b - i ) ) NEW_LINE DEDENT