问答题
阅读算法,回答问题。
void AC (List&L)
{
InitList(L);
InsertRear(L, 25);
InsertFront(L, 50);
int a[4] = {5, 8, 12, 15, 36);
for(int i=0; i<5; i++)
if(a[i]%2==0)InsertFront(L, a[i]);
else InsertRear(L, a[i]);
}
该算法被调用执行后,得到的线性表L为:
【正确答案】
【答案解析】
(36,12,8,50,25,5,15)
提交答案
关闭