Question: Write a C++ function to delete nodes in a linked list. The function takes two arguments - the head of the linked list and the

Write a C++ function to delete nodes in a linked list. The function takes two arguments - the head of the linked list and the value to be deleted. It should delete all nodes which contain the value to be deleted. It should return the head of the linked list. node * DeleteNode(node *head, int value); The linked list structure: struct node {int value; node *next;}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
