• 2021-04-14 问题

    (1)voidAA(BiTree*T){if(T){printf("%c",T->data);AA(T->lchild);AA(T->rchild);}}Writethefunctionofthealgorithmabove.(5.0分)

    (1)voidAA(BiTree*T){if(T){printf("%c",T->data);AA(T->lchild);AA(T->rchild);}}Writethefunctionofthealgorithmabove.(5.0分)

  • 2021-04-14 问题

    (2)intBB(LinkList*L){LinkList*p,*q,*r;p=L->next;if(!p)return0;while(p->next){q=p;while(q->next){if(q->next->data!=p->data)q=q->next;else{r=q->next;q->next=r->next;free(r);}}p=p->next;}}Writethefunctionofthealgorithmabove.(5.0分)

    (2)intBB(LinkList*L){LinkList*p,*q,*r;p=L->next;if(!p)return0;while(p->next){q=p;while(q->next){if(q->next->data!=p->data)q=q->next;else{r=q->next;q->next=r->next;free(r);}}p=p->next;}}Writethefunctionofthealgorithmabove.(5.0分)

  • 1