private TreeNode gT(int[] inorder, int inStart, int inEnd, int[] postorder, int pStart, int pEnd){
        if(inorder==null || postorder==null || inorder.length==0 || postorder.length==0 || inStart>inEnd || pStart>pEnd){
            return null;
        }
        int childRootVal = postorder[pEnd];
        TreeNode childRoot = new TreeNode(childRootVal);
        int childRootInOrderIndex = -1;
        for(int i=inStart; i<=inEnd; i++){
            if(inorder[i]==childRootVal){
                childRootInOrderIndex=i;
                break;
            }
        }
        if(childRootInOrderIndex==-1){
            return null;
        }
        int duration = childRootInOrderIndex-inStart;
        childRoot.left=gT(inorder, inStart, childRootInOrderIndex - 1, postorder, pStart, pStart + duration - 1);
        childRoot.right=gT(inorder, childRootInOrderIndex+1,inEnd, postorder, pStart+duration, pEnd-1);
        return childRoot;
    }