Question: Question 1 Figure 9 shows the linked list structure in which the pointer head points at the first node and the pointer next points at

Question 1 Figure 9 shows the linked list structure in which the pointer head points at the first node and the pointer next points at the next node. head next next next next next null F A B D E Figure 9 (a) After executing the following Java statements, head.next.next.next.next.next.next = head.next.next; head.next.next = head.next.next.next; head.next.next.next.next.next next - head; head = null; the linked list in Figure I will change to a circular list. Draw that circular list. (3 marks) (b) Complete the following Java statements such that after executing these statements, the linked list in Figure 9 will change to the two circular lists in Figure 10 and the pointer head will become a null pointer. (Note: modifying any of the following given parts of the Java statements or adding Java statements is not allowed.). (4 marks) = head.next.next.next.next; head.next.next.next.next = - head.next.next.next; head.next.next.next- head = null; next next D B next E C next 1 next next
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
