Consider a non-empty linked list of type ‘node’ where ‘head’ is the reference to the first node and ‘next’ refers to the next node in the list. What does the following code do? Public void method(){...

Consider a non-empty linked list of type ‘node’ where ‘head’ is the reference to the first node and ‘next’ refers to the next node in the list. What does the following code do? Public void method(){ node temp =new node(); node cur=head; while(cur.next!=null){ cur=cur.next; } cur.next=temp; temp.next=null; } a. Inserting a node at the end of the list b. Deleting a node at the end of the list c. Inserting a node at the beginning of the list d. Deleting a node at the beginning of the list

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here