250. Count Univalue Subtrees

tc: O(n) sc: O(n)

terminal case: null -> True every node: whether left subtree equals val, and right subtree equals val. Only true, count + 1. refer