aukher
BAN USERRascala coder mind it... All testing done... Rajnikanth rocks!
void Delete(node **head)
{
node *p=*head;
if(p==NULL) return;
if(p->next==NULL) {*head=NULL; free(p->data); free(p); return; }
node *q=p;
p=p->next;
while(p->next!=NULL) { p=p->next; q=q->next; }
q->next=q->next->next; //thats null, do check here!
free(p->data);
free(p);
}
- aukher March 14, 2012Rascala coder mind it... All testing done... Rajnikanth rocks!
void Delete(node **head)
{
node *p=*head;
if(p==NULL) return;
if(p->next==NULL) {*head=NULL; free(p->data); free(p); return; }
node *q=p;
p=p->next;
while(p->next!=NULL) { p=p->next; q=q->next; }
q->next=q->next->next; //thats null, do check here!
free(p->data);
free(p);
}
- aukher March 14, 2012Rascala coder mind it... All testing done... Rajnikanth rocks!
void Delete(node **head)
{
node *p=*head;
if(p==NULL) return;
if(p->next==NULL) {*head=NULL; free(p->data); free(p); return; }
node *q=p;
p=p->next;
while(p->next!=NULL) { p=p->next; q=q->next; }
q->next=q->next->next; //thats null, do check here!
free(p->data);
free(p);
}
- aukher March 14, 2012Rascala coder mind it... All testing done... Rajnikanth rocks!
void Delete(node **head)
{
node *p=*head;
if(p==NULL) return;
if(p->next==NULL) {*head=NULL; free(p->data); free(p); return; }
node *q=p;
p=p->next;
while(p->next!=NULL) { p=p->next; q=q->next; }
q->next=q->next->next; //thats null, do check here!
free(p->data);
free(p);
}
- aukher March 14, 2012
pussy cat pusst cat
- aukher March 14, 2012Rascala pussy