标签:http nod lan occurred dia most key with als
Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred element) in the given BST.
Assume a BST is defined as follows:
For example:
Given BST [1,null,2,2]
,
1 2 / 2
return [2]
.
Note: If a tree has more than one mode, you can return them in any order.
Follow up: Could you do that without using any extra space? (Assume that the implicit stack space incurred due to recursion does not count).
s
[LeetCode] Find Mode in Binary Search Tree 找二分搜索数的众数
标签:http nod lan occurred dia most key with als
原文地址:http://www.cnblogs.com/grandyang/p/6436150.html