Driver Code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT root = newnode ( 9 ) NEW_LINE root . left = newnode ( 4 ) NEW_LINE root . right = newnode ( 17 ) NEW_LINE root . left . left = newnode ( 3 ) NEW_LINE root . left . right = newnode ( 6 ) NEW_LINE root . left . right . left = newnode ( 5 ) NEW_LINE root . left . right . right = newnode ( 7 ) NEW_LINE root . right . right = newnode ( 22 ) NEW_LINE root . right . right . left = newnode ( 20 ) NEW_LINE k = 18 NEW_LINE print ( maxDiff ( root , k ) ) NEW_LINE DEDENT