Originally posted by 11520158
View Post
PHP Code:
void insertafterq(List &l,Node *p,Node *q)
{
if(q!=NULL)
{
p->pNext=q->pNext;
q->pNext=p;
if(l.pTail==q)
l.pTail=q; //Chổ này sai. l.pTail=p;
}
else
addHead(l,q); // chổ này ???. addHead(l,p);
}
Comment