void deletenothead(ListNode* pos)//删除无头非尾节点
{
if(pos==NULL||pos->pNext==NULL)
return ;
pos->data=pos->pNext->data;
pos->pNext=pos->pNext->pNext;
free(pos->pNext);
}
void reserve(ListNode* pHead)
{
ListNode* cur=pHead;
if(pHead==NULL)
return ;
reserve(cur->pNext);
cout<<pHead->data<<" ";
}
include
include