1026. Maximum Difference Between Node and Ancestor(递归+记录最大最小值)

problem: Given the root of a binary tree, find the maximum value V for which there exists different nodes A and B where V = |A.val - B.val| and A is an ancestor of B. (A node A is an ancestor of B if
相关文章
相关标签/搜索