Question
C++ Implement Delete Node Function Implement the function deleteNode( Node * head, int val ). There will be no input. Unit tests will be used
C++
Implement Delete Node Function
Implement the function deleteNode( 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 deleteNode( head, 3 ) is called. The list should be 1->2->4->5->nullptr Input NO INPUT Output NO OUTPUT
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started