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