Home > Back-end >  Ask questions about exchange of binary tree
Ask questions about exchange of binary tree

Time:09-21


Int main () {
STACK mystk;
BITREE * root;
S=& amp; Mystk;
Printf (" input the value of the binary tree nodes (each branch all ends with a zero input) : \ n ");
Root=creat ();
Printf (" first sequence traversal results as follows: \ n ");
PreOrder (root);
printf("\n");
Printf (" sequence traversal results for: \ n ");
PostOrder1 (root);
printf("\n");
Printf (" sequence traversal results as follows: \ n ");
InOrder (root);
printf("\n");
Exchange (root);
Printf (" in the exchange after sequence traversal results: \ n ");
InOrder (root);
printf("\n");
Exchange2 (root);
Printf (" again after the exchange of sequence traversal results as follows: \ n ");
InOrder (root);
printf("\n");
PostOrder (root);
return 1;
Main}/* */
  • Related