摘要:
点击查看代码 //闭合区间二分查找 public int Binary_Search_1(int[] num, int target){ int left = 0; int right = num.length - 1; while(left <= right){ int mid = left + 阅读全文
摘要:
105从前序和中序遍历序列构造二叉树 方法思路:hashmap存中序列表(数和序号)优化时间复杂度,先得到根节点,然后递归创建左子树和右子树。 106从后序和中序遍历序列构造二叉树 同上题 1373二叉搜索树的最大键值和 点击查看代码 class Solution { private int max 阅读全文