填空题 阅读算法f2,并回答下列问题:(1)设队列Q=(1,3,5,2,4,6)。写出执行算法f2后的队列Q;(2)简述算法f2的功能。voidf2(Queue*Q){DataTypee;if(!QueueEmpty(Q)){e=DeQueue(Q);f2(Q);EnQueue(Q,e);}}
填空题 已知栈的基本操作函数:intInitStack(SqStack*S);//构造空栈intStackEmpty(SqStack*S);//判断栈空intPush(SqStack*S,ElemTypee);//入栈intPop(SqStack*S,ElemType*e);//出栈函数conversion实现十进制数转换为八进制数,请将函数补充完整。voidconversion(){InitStack(S);scanf(“%d”,&N);while(N){(1);N=N/8;}while((2)){Pop(S,&e);printf(“%d”,e);}}//conversion
判断题 以链表作为栈的存储结构,出栈操作必须判别栈空的情况。