![](https://lstatic.shangxueba.com/sxbzda/h5/images/m_q_title.png)
[主观题]
以下算法的功能(栈中的数据元素类型为int)是()。voidalgo(Queue&Q){Stacks;intd;InitStack(S);while(!QueueEmpty(Q)(DeQueue(Qd);Push(S.d);;}while(!StackEmpty(S)){pop(S,d);EnQueue(Q,d);}}
以下算法的功能(栈中的数据元素类型为int)是()。voidalgo(Queue&Q){Stacks;intd;InitStack(S);while(!QueueEmpty(Q)(DeQueue(Qd);Push(S.d);;}while(!StackEmpty(S)){pop(S,d);EnQueue(Q,d);}}
A.将栈S中的元素逆置
B.将队列Q中的元素逆置
C.输出栈S中的元素
D.输出队列Q中的元素
![](https://lstatic.shangxueba.com/sxbzda/h5/images/tips_org.png)