
Implement a function that walks a singly linked list and discards every node whose payload matches a reference value, freeing the removed nodes as it goes.
list_filter(&head, &target, eq) where eq returns 0 on matchExpected result
every node whose data equals *target is unlinked and freedFor your own tracking. Tests grade your code.
list_filter(&head, &target, eq) with head == NULLExpected result
no-op, head stays NULLExpected files
list_filter.cAllowed functions
freeAllowed headers

v0.40: Create exercises. Challenge the community.
Meet Studio →Implement a function that walks a singly linked list and discards every node whose payload matches a reference value, freeing the removed nodes as it goes.
list_filter(&head, &target, eq) where eq returns 0 on matchExpected result
every node whose data equals *target is unlinked and freedFor your own tracking. Tests grade your code.
list_filter(&head, &target, eq) with head == NULLExpected result
no-op, head stays NULLExpected files
list_filter.cAllowed functions
freeAllowed headers

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.