-->
当前位置:首页 > 题库

单选题:Python中,带头结点的单链表的结点结构Node包含数据域data和指针域next,头结点为head,要把p结点链接到头结点之

Luz5年前 (2021-05-10)题库1119
Python中,带头结点的单链表的结点结构Node包含数据域data和指针域next,头结点为head,要把p结点链接到头结点之后的语句是( )。

@[B](2)

A. head.next=p; p.next=head.next
B. p.next=head.next; head.next=p
C. head.next=p
D. p.next=head.next



A.head.next=p; p.next=head.next
B.p.next=head.next; head.next=p
C.head.next=p
D.p.next=head.next


答案:B