Question: 3.23 Implement Delete Node Function Implement the function delete Nodel Node* head, int val). There will be no input. Unit tests will be used to

 3.23 Implement Delete Node Function Implement the function delete Nodel Node*

3.23 Implement Delete Node Function Implement the function delete Nodel Node* head, int val). There will be no input. Unit tests will be used to check your list deletes the given node. The lists used with your function will only have unique numbers. Free the memory of the node you are deleting. Use the struct given in the template for your nodes. Do not use the following libraries: algorithm, cmath Examples Input of a list 1->2->3->4->5->nullptr. If delete Node( head, 3) is called. The list should be 1->2->4->5->nullptr Input NO INPUT Output NO OUTPUT LAB ACTIVITY 3.23.1: Implement Delete Node Function 014 | main.cpp Load default template... 1 // Include the necessary header files NM+iON 3 struct Node { int val; Node * next; 8 void deleteNode( Node * head, int target ) { 9 // Traverse the list looking for the target value. 10 // You will need a variable that keeps track of the node prior to the one you are looking at. 11 } 12 13 int main({ 14 return 0; 15 16 }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!