int delete_user(const char *name, User **user_ptr_del) {
    User *curr = *user_ptr_del;
    User *prev = NULL;
 
    // If head node itself holds the key to be deleted
    if (curr != NULL && strcmp(curr->name, name)==0) {
        *user_ptr_del = curr->next; // Changed head
        free(curr); // free old head
    }
 
    // Search for the key to be deleted, keep track of the
    // previous node as we need to change 'prev->next'
    while (curr != NULL && strcmp(curr->name, name)!=0) {
        prev = curr;
        curr = curr->next;
    }
 
    // If key was not present in linked list
    if (curr == NULL)
        return 1;
 
    // Unlink the node from linked list
    prev->next = curr->next;
    free(curr); // Free memory
    return 0;
}
traverse linked list and delete node with given name