Name

set_remove

Synopsis

int set_remove(Set *set, void **data);

Return Value

0 if removing the member is successful, or -1 otherwise.

Description

Removes the member matching data from the set specified by set. Upon return, data points to the data stored in the member that was removed. It is the responsibility of the caller to manage the storage associated with the data.

Complexity

O (n), where n is the number of members in the set.

Get Mastering Algorithms with C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.