我给个题吧。最近面试碰到的 Find number of subtrees in a tree which has the same value. public int FindNumberOfSubTrees(Node root) Note: The leaf node itself is a subtree.
【在 w**z 的大作中提到】 : 我给个题吧。最近面试碰到的 : Find number of subtrees in a tree which has the same value. : public int FindNumberOfSubTrees(Node root) : Note: : The leaf node itself is a subtree.
l*a
9 楼
你再开一帖吧 这样大家看着方便,你也不至于被认为给二爷搅场子
【在 w**z 的大作中提到】 : 我给个题吧。最近面试碰到的 : Find number of subtrees in a tree which has the same value. : public int FindNumberOfSubTrees(Node root) : Note: : The leaf node itself is a subtree.
w*z
10 楼
correction. 搞糊涂了,那是另一个题,搞混了 The number of subtrees with all the value are the same public int FindNumberOfSubTreesWithSameValue(Node root) 5 1 2 1 3 1 answer : 4