摘要: public class ConvertSortedArrayToBinarySearchTree { public static TreeNode sortedArrayToBST(int[] nums) { if (nums == null || nums.length == 0) { return null; } ... 阅读全文
posted @ 2019-07-02 16:30 无天666 阅读(387) 评论(0) 推荐(0) 编辑
摘要: public class InorderSuccessorInBST {//平衡二叉树查找后继结点 public TreeNode inorderSuccessor(TreeNode root, TreeNode p) { if (p == null) { return null; } if (getLastEnt... 阅读全文
posted @ 2019-07-02 10:13 无天666 阅读(456) 评论(0) 推荐(0) 编辑