- 博客(1)
- 收藏
- 关注
原创 Inorder Successor in BST
Given a binary search tree and a node in it, find the in-order successor of that node in the BST.在树中寻找一个节点在中序遍历下的后续节点,此类问题是带条件的遍历,设定某个条件,在遍历过程中符合给定条件时,将节点存入结果,最终返回结果即可。如采用递归遍历,结果可设为一个全局变量ans,如需辅...
2018-09-13 10:06:48
201
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人