Question: Objectives: 1. Review on LinkedList data structure and Binary search algorithm Instruction 1. For all recitation exercise, we highly recommend that you submit a typed


Objectives: 1. Review on LinkedList data structure and Binary search algorithm Instruction 1. For all recitation exercise, we highly recommend that you submit a typed solution with the original questions inside; in case you don't have enough time to do so, a hand- written one is acceptable only when the solution is clearly written and must be saved in .pdf format. Note: unreadable answer receives no credits! 2. All recitation exercises must be submitted through the link posted on Canvas, we do NOT accept any hand-in submissions or submissions sent through emails. No late submission will be accepted, no exceptions! Question 1. [5 pts] Given the following linked list and Node definition. head 17 5 -9 21 prv current struct Node { int data; Node* next; } 1.1 [2 pts] As above shows, prv and current are pointers that is currently pointing to Node 17 and 5 respectively. Write segment of C++ code to insert a new Node with value 4 after current node and update the two pointers prv and current accordingly (i.e. current should point to Node 4 and prv should point to 5 instead). 1.2 [3 pts] Write segment of C++ code to compute sum of all integers stored inside above linked list and save it inside a variable called sumint
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
