typedef struct dnode
{
int data;
struct dnode *prior;
struct dnode *next;
}DNode;
void node_delete(DNode *head, int position)
{
DNode *p = head;
DNode *q = NULL;
int i = 0;
while(p && i++ < position)
p = p->next;
p->prior->next = p->next;
p->next->prior = p->prior;
free(p);
}
阅读(572) | 评论(0) | 转发(0) |