Remove Linked List Elements
Try to solve the Remove Linked List Elements problem.
We'll cover the following
Statement
You are given the head of a linked list and an integer k
. Remove all nodes from the linked list where the node’s value equals k
, and return the head of the updated list.
Constraints:
The number of nodes in the linked list is in the range
. Node.data
k
Examples
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.