Find the largest j such that dp [ n ] [ j ] is true where j loops from sum / 2 t0 0
for j in range ( su // 2 , - 1 , - 1 ) : NEW_LINE INDENT if dp [ n ] [ j ] == True : NEW_LINE INDENT diff = su - ( 2 * j ) NEW_LINE break NEW_LINE DEDENT DEDENT return diff NEW_LINE