当前位置: > 一道数据结构的线性表题...
题目
一道数据结构的线性表题
试分别用顺序表和单链表作为存储结构,实现将线性表(a0,a1,...,an-1)就地逆置的操作 ,所谓“就地”支付住空间应为O(1)(c语言)

提问时间:2021-03-31

答案
void convert(Node *head) { //单链表逆置 Node *p=head; Node *newNode=null; Node *temp; while(p){ temp=p->next; p->next=newNode; newNode=p; p=temp; } } template //输出函数 void Singlelist::Output(ostrea...
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
1,人们染上烟瘾,最终因吸烟使自己丧命.
版权所有 CopyRight © 2012-2019 超级试练试题库 All Rights Reserved.