摘要: /** * 打印从根到叶子各个节点和为iSum的路径 * @param pNode 树根节点(该函数不负责判空操作) * @param iSum 所要查找的路径和 * @param path 路径(数组长度为树的深度,可用容器替代) * @param size 路径长度(初始值为0) */vo... 阅读全文
posted @ 2015-08-10 21:22 指上弹兵赵小括 阅读(159) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;bool isPostorderOfBST(int postorder[], int low, int high){ if(postorder == NULL || low = 0 && postorder[pivot] > posto... 阅读全文
posted @ 2015-08-10 20:43 指上弹兵赵小括 阅读(165) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std;bool IsPopOrder(int *pPush, int *pPop, int length){ if(NULL == pPush || NULL == pPop || 0 >= length) return f... 阅读全文
posted @ 2015-08-10 19:14 指上弹兵赵小括 阅读(171) 评论(0) 推荐(0) 编辑