You are given the root of a complete binary tree.
A node x is called dominant if its value is equal to the maximum value among all nodes in the subtree rooted at x.
Return the number of dominant nodes in the tree.
Example 1:

Input: root = [5,3,8,2,4,7,1]
Output: 5
Explanation:
[8, 7, 1].Example 2:

Input: root = [1,2,3,1,2]
Output: 4
Explanation:
[2, 1, 2] is dominant because its value is the maximum value in its subtree.Constraints:
[1, 105].1 <= Node.val <= 109Process the tree using postorder traversal, so both child subtrees are handled before their parent.
For each node, compute the maximum value in its subtree from its own value and the maximum values returned by its children.
A node is dominant if its value is equal to this subtree maximum.
[5,3,8,2,4,7,1]
[1,2,3,1,2]