1026. Maximum Difference Between Node and Ancestor

題目: Given the root of a binary tree, find the maximum value V for which there exist 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 either:
相關文章
相關標籤/搜索