Given the root of a binary tree, return the number of uni-value subtrees.
A subtree of treeName is a tree consisting of a node in treeName and all of its descendants.
A uni-value subtree means all nodes of the subtree have the same value.
Example 1:
Input: root = [5,1,5,5,5,null,5]
Output: 4Example 2:
Input: root = []
Output: 0Example 3:
Input: root = [5,5,5,5,5,null,5]
Output: 6Constraints:
[0, 1000].-1000 <= Node.val <= 1000