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
相關文章
相關標籤/搜索