目录

力扣501. 二叉搜索树中的众数

力扣501. Find Mode in Binary Search Tree(二叉搜索树中的众数)

找出 BST 中的众数。

示例 1:

../posts/01_学习/87_LeetCode/0501_二叉搜索树中的众数/img/0501-1-description.png

输入:root = [1,null,2,2]
输出:[2]

提示:

  • 如果众数超过一个,不需考虑输出顺序。