单选题:Python单链表的指针域为next,其头结点由指针head指向,则把指针p指向的结点链接到头结点之后的语句序列为( )
单链表的指针域为next,其头结点由指针head指向,则把指针p指向的结点链接到头结点之后的语句序列为( )
### 来源:
黄龙军, 等. 数据结构与算法(Python语言描述), 上海: 上海交通大学出版社, 2023. (In Press)
A.p.next=head.next; head.next=p
B.head.next=p; p.next=head.next;
C.head.next = p.next; p= head.next
D.p.next=head; head=p
答案:A
### 来源:
黄龙军, 等. 数据结构与算法(Python语言描述), 上海: 上海交通大学出版社, 2023. (In Press)
A.p.next=head.next; head.next=p
B.head.next=p; p.next=head.next;
C.head.next = p.next; p= head.next
D.p.next=head; head=p
答案:A