摘要: 编程之美3.8-求二叉树中节点最大距离编程之美3.10分层遍历二叉树View Code #include <iostream>#include <vector>#include <cstring>#include "general.h"//编程之美3.8-求二叉树中节点最大距离-递归int getMaxDepth(CPTNODE pNode) //求最大深度{ if (pNode == NULL) { return -1; } return 1 + MAX(getMaxDepth(pNode->left), getMaxDepth( 阅读全文
posted @ 2011-09-06 10:28 lifengzhong 阅读(245) 评论(0) 推荐(0) 编辑