Grokking the Art of Recursion for Coding Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
Solution: Removing Nodes From Linked List
On this page

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 #InputExpected OutputDescription
11 -> 2 -> 3 -> 4 -> 21 -> 3 -> 4Remove all nodes with value 2 from the list.
22 -> 2 -> 2 -> 2 -> 2

.....

.....

.....

Like the course? Get enrolled and start learning!

On this page