Question: Question 4: (a) Write the C++ function below that will reverse any linked structure starting at head, reversing all node pointers as illustrated below. (4

Question 4: (a) Write the C++ function below that will reverse any linked structure starting at head, reversing all node pointers as illustrated below. (4 marks) from0-6-:@ to-O-9-O-O void reverse ( Node*& head) your code ] (b) Explain what Node& is and why we need and &. (1 mark) (c) Suggest and alternative solution that does not modify any pointer. (I mark)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
