2019年3月17日

二叉搜索树与双向链表

摘要: 将BST转成双向链表,相当于中序遍历 非递归法: public class Solution { public static TreeNode Convert(TreeNode pRootOfTree) { TreeNode p = pRootOfTree; TreeNode q = null; i 阅读全文

posted @ 2019-03-17 23:27 q2013 阅读(80) 评论(0) 推荐(0) 编辑

二叉搜索树的后序遍历序列

摘要: 二叉搜索树:右子树的所有结点大于根,左子树的所有结点小于根。 注意点:递归结束条件 public class Solution { public boolean VerifySquenceOfBST(int [] sequence) { if(sequence.length == 0) return 阅读全文

posted @ 2019-03-17 16:32 q2013 阅读(109) 评论(0) 推荐(0) 编辑

导航