int GetNodeNumKthLevel(Node *pRoot, int k){ if (!pRoot || k < 1) return 0; if (k = 1) return 1; return GetNodeNumKthLevel(pRoot->pLeft, k-1) + GetNodeNumKthLevel(pRoot->pRight, k-1);}
EOF
本文共 210 字,大约阅读时间需要 1 分钟。
int GetNodeNumKthLevel(Node *pRoot, int k){ if (!pRoot || k < 1) return 0; if (k = 1) return 1; return GetNodeNumKthLevel(pRoot->pLeft, k-1) + GetNodeNumKthLevel(pRoot->pRight, k-1);}
EOF
转载地址:http://wawmx.baihongyu.com/