面试题5:重建二叉树 (二)

2014-11-23 22:30:51 ? 作者: ? 浏览: 9
) { int nPreOrderArr[8] = {1,2,4,7,3,5,6,8}; int nInOrderArr[8] = {4,7,2,1,5,3,8,6}; BiTreeNode *pRoot = CreateBiTreeByPreorderAndInorder(nPreOrderArr, nInOrderArr,8); cout << "先序序列:"; PreOrderPrint(pRoot); cout << endl; cout << "后序序列:"; InOrderPrint(pRoot); cout << endl; system("pause"); return 0; }

-->

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: