search the most right node from root. If the most right root has no child, return its parent; otherwise return the largest number of its left child tree
找出一个bst中第二大的数
最新推荐文章于 2022-11-13 08:00:00 发布
本文介绍了一种从根节点开始查找最右侧节点的方法:如果最右侧的节点没有子节点,则返回其父节点;如果有子节点,则返回左侧子树中的最大值。
4398

被折叠的 条评论
为什么被折叠?



