Given the root of a binary tree, determine the maximum value
Note: A node
is an ancestor of if any child of is equal to or any child of is an ancestor of .
Constraints:
The number of nodes in the tree is in the range
Node.val
Given the root of a binary tree, determine the maximum value
Note: A node
is an ancestor of if any child of is equal to or any child of is an ancestor of .
Constraints:
The number of nodes in the tree is in the range
Node.val