• 2021-04-14
    写出下面算法的功能。Bitree*function(Bitree*bt){Bitree*t,*t1,*t2;if(bt==NULL)t=NULL;else{t=(Bitree*)malloc(sizeof(Bitree));t->data=bt->data;t1=function(bt->left);t2=function(bt->right);t->left=t2;t->right=t1;}return(t);}
  • 交换二叉树结点左右子树的递归算法
    本题目来自[网课答案]本页地址:https://www.wkda.cn/ask/epmjzttyympezto.html

    内容

    • 0

      voidABC(BTNode*BT){ifBT{ABC(BT->left);ABC(BT->right);cout<data<

    • 1

      下列卷积运算可能错误的是_____。 未知类型:{'options': ['f(t)*δ(t)=f(t)', 'f(t) =f’(t) *u(t)', 'f(t−t1)*δ(t−t2)=f(t−t1−t2)', ''], 'type': 102}

    • 2

      以下程序段采用先根遍历方法求二叉树的叶子数,请在横线处填充适当的语句(注意:字符之间不要留空白)。 void countleaf (bitree ptr t,int &count) { /*根指针为t,假定叶子数 count 的初值 = 0 */ if (t!=NULL) { if ( (t->lchild==NULL) && (t->rchild==NULL)) (1)________; countleaf (t->lchild,count); countleaf(l->rchild,count); } }

    • 3

      下列卷积运算可能错误的是_____。 A: f(t)*δ(t)=f(t) B: f(t) =f’(t) *u(t) C: f(t−t1)*δ(t−t2)=f(t−t1−t2) D: [img=155x32]1803c9ee577dcb6.png[/img]

    • 4

      经过以下代码,t的结果是 t1=(1, 'a')[br][/br] t2=(2, 'b') t = t1 + t2 A: (3,'ab') B: ((1,'a'),(2,'b')) C: (1,'a',2,'b') D: (3,'a','b')