leetcode刷题题解——106. 从中序与后序遍历序列构造二叉树
private Map
private int postindex;
public TreeNode buildTree(int[] inorder, int[] postorder) {
indexMap = new HashMap<>();
int len = postorder.length;
postindex = len - 1;
for (int i=0;i
private Map
private int postindex;
public TreeNode buildTree(int[] inorder, int[] postorder) {
indexMap = new HashMap<>();
int len = postorder.length;
postindex = len - 1;
for (int i=0;i
共有 0 条评论