LinearList/LoopSingleLinkList.c
int delete (Node* L, int data) {
    Node* preNode = L;
    Node* node = L->next;
    while (node != L) {
        if (node->data == data) {
            preNode->next = node->next;
            free(node);
            L->data--;
            return TRUE;
        }
        preNode = node;
        node = node->next;
    }
    return FALSE;
}
/**
 * delete item in link list
 * @param L the head pointer of link list
 * @param data the data you want to delete
 * @return success flag
 */
delete item in link list
@param L the head pointer of link list
@param data the data you want to delete
@return success flag
delete item in link list @param L the head pointer of link list @param data the data you want to delete @return success flag
int delete (Node* L, int data) {
    Node* preNode = L;
    Node* node = L->next;
    while (node != L) {
        if (node->data == data) {
            preNode->next = node->next;
            free(node);
            L->data--;
            return TRUE;
        }
        preNode = node;
        node = node->next;
    }
    return FALSE;
}
int delete ( Node * L , int data ) { Node * preNode = L ; Node * node = L -> next ; while ( node != L ) { if ( node -> data == data ) { preNode -> next = node -> next ; free ( node ) ; L -> data -- ; return TRUE ; } preNode = node ; node = node -> next ; } return FALSE ; }
delete item in link list
 @param L the head pointer of link list
 @param data the data you want to delete
 @return success flag
delete item in link list @param L the head pointer of link list @param data the data you want to delete @return success flag