//1、逆向打印链表(递归)voidPrintTailToHead(ListNode*pHead){ListNode*cur=pHead;if(cur!=NULL){PrintTailToHead(cur->_next);printf("%d",cur->_data);}}//2、删除无头链表中的非尾节点voidDelNoTail(ListNode*pos){assert(pos&&pos->_next);ListNode*next=pos->_next;swap(pos->_data,next->_data);pos->_next=next->_next;free(next);}//3、无头链表非头结点前插入一个节点voidInsertNoHead(ListNode*pos,DataTypex){ListNode*tmp=BuyNode(pos->_data);tmp->_next=pos->_next;pos->_next=tmp;pos->_data=x;}//4、约瑟夫环问题(假设是一个循环单链表)ListNode*Josephuscycle(ListNode*pHead,DataTypex){ListNode*cur=pHead;while(1){if(cur=cur->_next){returncur;}DataTypem=x;while(--x){cur=cur->_next;}ListNode*next=cur->_next;swap(cur->_data,next->_data);cur->_next=next->_next;free(next);}}