Driver Code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT vertex = [ 4 , 2 , 1 , 6 , 3 , 5 , 2 ] NEW_LINE edges = [ [ 0 , 1 ] , [ 0 , 2 ] , [ 0 , 3 ] , [ 2 , 4 ] , [ 2 , 5 ] , [ 3 , 6 ] ] NEW_LINE N = len ( vertex ) NEW_LINE print ( getMinSubtreeSumDifference ( vertex , edges , N ) ) NEW_LINE DEDENT