问题描述:
[单选]
已知不带头结点的单链表L,下面用函数实现的在第一个元素前面插入值为x的元素结点的算法错误的是()
A.void insert(List *L,elemtype x){ ptr p=*L; node d=new node(x); ptr q=&d; q->next=p; L=&q;}
B.List * insert(List *L,elemtype x){ ptr p=*L; node d=new node(x); ptr q=&d; q->next=p; L=&q; return L;}
C.void insert(List *L,elemtype x){ ptr p=*L; node d=new node(x); ptr q=&d; p->next=q; L=&q;}
D.List * insert(List *L,elemtype x){ ptr p=*L; node d=new node(x); ptr q=&d; q->next=p; return &q;}
参考答案:查看无
答案解析:无
☆收藏
答案解析:无
☆收藏
上一篇:当在一个有序的顺序存储表上查找一个数据时,可用折半查找,也可用顺序查找,但前者比后者的查找速度()
下一篇:假设按照行优先存储整数数组A【9】【8】,第一个元素a11的首字节地址是100,每个整数占4个字节,则元素a32的存储地址是()提示( )数组大小是9行8列,第一个位置是1,不是0
- 我要回答: 网友(216.73.216.119)
- 热门题目: 1.三维动画相对于传统二维动画 2.目前市面上功能比较完备的主 3.在电影、动画中1秒=()帧画
