Your mission
Remove the first node of a linked list whose data matches ref, and free it.
See it in action
list_remove_first(&head, &ref, cmp) // list: 3, 7, 5, 7 and ref: 7list: 3 5 7list_remove_first(&head, &ref, cmp) // list: 9 and ref: 9head is NULLlist_remove_first(&head, &ref, cmp) // list: 3, 5 and ref: 8list: 3 5
Your checklist
Constraints
- Expected file
list_remove_first.c- Allowed functions
free- Allowed headers
<stdlib.h>declares free<stddef.h>defines NULL
