【单选题】【消耗次数:1】
在单链表中,增加头结点的目的是( )。
使单链表至少有一个结点
标志表中首结点的位置
方便运算的实现
说明该单链表是线性表的链式存储结构
参考答案:
复制
纠错
相关题目
【判断题】 在具有头结点的单链表中,头指针指向链表的第一个数据结点。
①  正确
②  错误
【单选题】 对于一个头指针为head的带头结点的单链表,判定该表为空表的条件是()。
①  head==NULL
②  head-next==NULL
③  head-next==head
④  head-next=head
【单选题】 在一个具有n个结点的有序单链表中插入一个新结点并保持该表有序的时间复杂度是( )。
①  O(1)
②  O(n)
③  O(n的平方)
④  O(log2n)
【单选题】 在一个有向图的邻接表中,每个顶点单链表中结点的个数等于该顶点的( )。
①  出边数
②  入边数
③  度数
④  度数减1
【单选题】 用单链表表示的链式队列的队头在链表的( )位置。
①  A.链头
②  B.链尾
③  C.链中
④  D.任意位置
【单选题】 设指针q指向单链表中结点A,指针p指向单链表中结点A的后继结点B,指针s指向被插入的结点X,则在结点A和结点B插入结点X的操作序列为()。
①  s-next=p-next;p-next=-s
②  q-next=s;s-next=p
③  p-next=s-next;s-next=p
④  p-next=s;s-next=q
【单选题】 在一个单链表中,已知q结点是p结点的前趋结点,若在q和p之间插入s结点,则须执行( )。
①  s->next=p->next; p->next=s
②  q->next=s; s->next=p
③  p->next=s->next; s->next=p
④  p->next=s; s->next=q
【单选题】 设一个有序的单链表中有n个结点,现要求插入一个新结点后使得单链表仍然保持有序,则该操作的时间复杂度为()。
①  O(log2n)
②  O(1)
③  O(n2)
④  O(n)
【单选题】 在一个单链表中,p、q分别指向表中两个相邻的结点,且q所指结点是p所指结点的直接后继,现要删除q所指结点,可用语句( )。
①  A.p=q-next
②  B.p-next=q
③  C.p-next=q-next
④  D.q-next=NULL
【判断题】 线性表的每个结点只能是一个简单类型,而链表的每个结点可以是一个复杂类型。
①  正确
②  错误
随机题目
【单选题】 27. For quite _____ students,their teachers advice is more important than _____ of their parents.
①  few;one
②  afew;that
③  alittle;some
④  alot;many
【单选题】 23. Never _______ forget the days when _______ together with you.
①  shallI;Ilived
②  shallI;didIlive
③  Ishall;Ilived
④  Ishall;didIlived
【单选题】 28. "_____ your meeting is!" he offered them his sincere congratulations.
①  Howagreatsuccess
②  Whatagreatsuccess
③  Howgreatsuccess
④  Whatgreatsuccess
【单选题】 24. Why didnt you tell me there was no meeting today? I _____ all the way here _____the heavy snow.
①  neednthavedriven;though
②  canthavedriven;across
③  mustnthavedriven;through
④  shouldnthavedriven;cross
【单选题】 25.It was the training _______ he had at school _______ made him good jumper.
①  what;what
②  that;that
③  what;that
④  that;had
【单选题】 26. It was _____ great shock to the world that two airplanes crashed into _____ World Trade Centre in New York on Sept.11.
①  a;/
②  the;the
③  a;the
④  /;the
【单选题】 29. We must remember that _____fashion is not the most important thing in _______ life.
①  /;the
②  /;/
③  the;/
④  the;the
【单选题】 22. The two old sisters,_______ so long,held each other and burst into tears.
①  beingseparated
②  havingbeenseparated
③  havingsepartated
④  hadbeensepartated
【单选题】 30. It _____ quite a few years _____ the accused was declared innocent and set free.
①  was;since
②  is;that
③  willbe;when
④  was;before
【单选题】 36._____ their real economic situations, they got some relief fund from the government.
①  Considering
②  Considered
③  Havingbeenconsidered
④  Beingconsidered