- 博客(2)
- 收藏
- 关注
原创 【树】求二叉树高度函数
int GetHeight(BinTree BT){if (!BT)return 0;int leftheight = GetHeight(BT->Left);int rightheight = GetHeight(BT->Right);return (leftheight>rightheight ) ? (leftheight + 1) : (rightheight + 1)
2017-11-19 09:10:24 801
原创 【树】Level_Order_Traversal
void Level_order(Tree T, void (*visit)(Tree ThisNode)){Tree a[105];int front, rear, i;i = front = rear = 0;a[rear] = T;if (a[i] == NULL) return;while (i {if (a[i]->Left != NULL){
2017-11-18 22:04:58 240
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人