2 thoughts on “The test process of the data structure "the operation of the tree (a binary tree and its precedent)" has errors, and it is necessary to correct it.”
Leave a Comment
You must be logged in to post a comment.
You must be logged in to post a comment.
// ****************************************************************************************************************************************************************************************************************************************************************** is it means, I hope to help you and hope to be adopted.
// ********************************************************************************************************************************************************************************, h>
// ******************** grades add header file
# define bitreptr struct type1/*binary tree and its preface edge calendar calendar calendar calendar */
# define null 0
# define len sizeof (bitreptr)
bitreptr*bt;
int f, g;
bitreptr/*binary tree node description*/
{
chan;
bitreptr*lchild,*rchild;
}; ******** begin 添加返回值类型rnvoid preorder(bitreptr *bt) /*先序遍历二叉树*/rn// ************* ************* End add the return value type
{
if (g == 1) propfn");
g = g 1;
if (bt)
{
printf ("l ", bt-> data); -> lchild);
Preorder (BT-> Rchild);
}
els if (g == 2) Printf ("empty treen");
}
bitreptr *CRT_BT () / *Create a binary tree * /
{
bitreptr *bt;
char ch;
if (F = = 1) Printf ("Enter the root node,#indicates the endn");
else propf (" Input nodes,#indicate endn");
scanf ("n%c ",
[ProE