Driver Code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT N = 5 NEW_LINE M = 4 NEW_LINE Edges = [ [ 1 , 2 ] , [ 2 , 3 ] , [ 4 , 5 ] , [ 1 , 3 ] ] NEW_LINE arr = [ 13 , 8 , 3 , 15 , 18 ] NEW_LINE getMaximumDifference ( Edges , arr , N , M ) NEW_LINE DEDENT