文件名称:ew
介绍说明--下载内容来自于网络,使用问题请自行百度
判断二叉树,先判断元素个数与高度是不是符合完全二叉树的规律,不符合则FALSE。
之后按层次遍历的方法,不同的是遇到NULL也放入,出队时,遇到第一个NULL跳出。
如果之后出队的全是NULL,则是完全二叉树,否则不是。-Judgment tree, first determine the number of elements with a high degree of complete binary tree is not in line with the law, does not meet the FALSE. After traversing the hierarchical method, the difference is encountered also put NULL, when the teams met the first NULL jump. If, after the whole team is NULL, then a complete binary tree, otherwise not.
之后按层次遍历的方法,不同的是遇到NULL也放入,出队时,遇到第一个NULL跳出。
如果之后出队的全是NULL,则是完全二叉树,否则不是。-Judgment tree, first determine the number of elements with a high degree of complete binary tree is not in line with the law, does not meet the FALSE. After traversing the hierarchical method, the difference is encountered also put NULL, when the teams met the first NULL jump. If, after the whole team is NULL, then a complete binary tree, otherwise not.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
btree.h
main.cpp
queue.h
readme.txt
zhan.h
main.cpp
queue.h
readme.txt
zhan.h
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.