We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/kangjianwei/Data-Structure/blob/master/Dev-C%2B%2B/CourseBook/0607_CSTree/CSTree.cpp //提问者认为在此函数中在42-44行已经有判断树是否存在的算法,第48行和52行判断长子树和兄弟树是否存在的算法是冗余的,不知是否可以去掉?
Status ClearTree(CSTree* T) { if(T == NULL) { return ERROR; } // 在*T不为空时进行递归清理 if(*T) { if((*T)->firstchild != NULL) { ClearTree(&((*T)->firstchild)); } if((*T)->nextsibling != NULL) { ClearTree(&((*T)->nextsibling)); } free(*T); *T = NULL; } return OK;
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
https://github.com/kangjianwei/Data-Structure/blob/master/Dev-C%2B%2B/CourseBook/0607_CSTree/CSTree.cpp
//提问者认为在此函数中在42-44行已经有判断树是否存在的算法,第48行和52行判断长子树和兄弟树是否存在的算法是冗余的,不知是否可以去掉?
}
The text was updated successfully, but these errors were encountered: