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