1. Reverse Print List (recursive) void printtailtohead (listnode *phead) { ListNode *cur = pHead; if (Cur != NULL) { printtailtohead (Cur->_next); printf ( "%d ", Cur->_data) ;                 }}//2, Delete a non-tailed node in a headless list Void delNoTail (Listnode *pos) { assert (pos && pos->_next ); listnode *next = pos->_next ; swap ( pos->_data ,next->_data ); pos->_next = next->_next ; free (next);} 3. Insert a node void insertnohead (listnode * pos, datatype x) { before the non-head node of the headless list. ListNode *tmp = Buynode (pos->_data ); tmp->_next = pos->_next; pos->_next = tmp; pos- >_data = x;} 4. Joseph Ring Problem (assumed to be a circular single-linked list) listnode* josephuscycle (listnode *phead, datatype x) { listnode *cur = pHead; while (1) { if (CUR =&NBsp;cur->_next ) { return cur; } DataType m = x; while (--x) { cur = cur- >_next ; } listnode *next = cur->_next ; swap (cur->_data ,next- >_data); cur->_next = next->_next ; free (Next); }}
Reverse printing of single linked list, delete headless non-tail node, headless list insertion node, Joseph Ring