面试题 63:二叉搜索树的第k个结点
题目:给定一颗二叉搜索树,请找出其中的第k大的结点。例如, 5 / \ 3 7 /\ /\ 2 4 6 8 (见下面的图1) 中,按结点数值大小顺序第三个结点的值为4。
图1:一个有7个结点的二叉搜索树,如果按结点数值大小顺序输出,则第3个结点的值是4
提交网址: http://www.nowcoder.com/practice/ef068f602dde4d28aab2b210e859150a?tpId=13&tqId=11215
分析:
面试题 63:二叉搜索树的第k个结点
题目:给定一颗二叉搜索树,请找出其中的第k大的结点。例如, 5 / \ 3 7 /\ /\ 2 4 6 8 (见下面的图1) 中,按结点数值大小顺序第三个结点的值为4。
图1:一个有7个结点的二叉搜索树,如果按结点数值大小顺序输出,则第3个结点的值是4
提交网址: http://www.nowcoder.com/practice/ef068f602dde4d28aab2b210e859150a?tpId=13&tqId=11215
分析: