Leetcode日练笔记41 [二叉树recursion专题] #250 Count Univalue Subtrees /Medium {Python}
Giventherootofabinarytree,returnthenumberofuni-valuesubtrees.Auni-valuesubtreemeansallnodesofthesubtreehavethesamevalue.Example1:Input:root=[5,1,5,5,5,null,5]Output:4Example2:Input:root=[]Output:0Exam