private Node buildSubTree(String preorder, String inorder) {
            if (preorder.length() != inorder.length()) {
                return null;
            }
            if (preorder.length() == 0) {
                return null;
            }
            char currentValue = preorder.charAt(0);

            int currentIndexInorder = inorder.indexOf(currentValue);

            Node leftChild = null;
            if (currentIndexInorder > 0) {
                String leftInorder = inorder.substring(0, currentIndexInorder);
                String leftPreorder = preorder.substring(1, currentIndexInorder+1);
                leftChild = buildSubTree(leftPreorder, leftInorder);
            }

            Node rightChild = null;
            if (currentIndexInorder < preorder.length()-1) {
                String rightInorder = inorder.substring(currentIndexInorder+1);
                String rightPreorder = preorder.substring(currentIndexInorder+1);
                // BUG1: copy from leftxxx section and forget to delete some params
                rightChild = buildSubTree(rightPreorder, rightInorder);
            }

            return new Node(currentValue, leftChild, rightChild);
        }