设p指向双向链表中某结点,s指向待插入的值为x的新结点,将*s插入到*p的前面,所需要的操作过程是A.\x05① p->prior->next=s; ② s->prior=p->prior; ③ s->next=p; ④ p->prior=s;B.\x05① s->prior=p->prior; ② p->prior-

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/29 23:28:18
设p指向双向链表中某结点,s指向待插入的值为x的新结点,将*s插入到*p的前面,所需要的操作过程是A.\x05① p->prior->next=s; ② s->prior=p->prior; ③ s->next=p; ④ p->prior=s;B.\x05① s->prior=p->prior; ② p->prior-
xRMO@+I/,MwxăPȢmۊQb0R%>bL("ζζL`{of^V&w Vb owW7{cI7N.097~6`Xa^ .iФmQ56m{F~umfb$n.d{)u=6:Ϧent"y"+jrɿ^?=UnħfߪlBX fN Xfw:̹a}p0c&$?Z [#PB-":XƈG7u~:P{)y,EA{( rR%YE.

设p指向双向链表中某结点,s指向待插入的值为x的新结点,将*s插入到*p的前面,所需要的操作过程是A.\x05① p->prior->next=s; ② s->prior=p->prior; ③ s->next=p; ④ p->prior=s;B.\x05① s->prior=p->prior; ② p->prior-
设p指向双向链表中某结点,s指向待插入的值为x的新结点,将*s插入到*p的前面,所需要的操作过程是
A.\x05① p->prior->next=s; ② s->prior=p->prior; ③ s->next=p; ④ p->prior=s;
B.\x05① s->prior=p->prior; ② p->prior->next=s; ③ s->next=p; ④ p->prior=s;
为什么选A不选B呢,我觉得两个都可以呀

设p指向双向链表中某结点,s指向待插入的值为x的新结点,将*s插入到*p的前面,所需要的操作过程是A.\x05① p->prior->next=s; ② s->prior=p->prior; ③ s->next=p; ④ p->prior=s;B.\x05① s->prior=p->prior; ② p->prior-
两个是一样的,①、②步两步都没有改变p->prior,所以说两步不分先后,没有差别~~~