EMSD1303测试答案(15)
发布时间:2021-06-07
发布时间:2021-06-07
if(pnode_next->data > element){
break;
}
pnode_current = pnode_next;
pnode_next = pnode_current->next;
}
newnode = (struct Node*)malloc(sizeof(Node)); assert(newnode != NULL);
newnode->data = element;
newnode->next = pnode_next;
pnode_current->next = newnode;
newnode->before=pnode_current!=p_listpnode_current:p_list;
(pnode_next !=NULL?pnode_next:p_list)->before = newnode;
return 0;
}
int query(Node *p_list){
assert(p_list != NULL);
Node *p_i = p_list->next;
while(p_i != NULL){
printf(“%d\n”,p_i->data);
p_i = p_i->next;