Back to course home
0% completed
Vote For New Content
15. Removing Nodes From Linked List
Problem Statement
Write Recursive Approach for Removing Nodes From Linked List.
Given a singly linked list and a target value, write a recursive algorithm to remove all nodes from the linked list that have the target value.
Examples:
Sr # | Input | Expected Output | Description |
---|---|---|---|
1 | 1 -> 2 -> 3 -> 4 -> 2 | 1 -> 3 -> 4 | Remove all nodes with value 2 from the list. |
2 | 2 -> 2 -> 2 -> 2 -> 2 |
.....
.....
.....
Like the course? Get enrolled and start learning!
On this page