X410: changeNodesOrder1

Consider the following class definition:
   class Link{
      Object data;
      Link next;
   }
Remove the node at the beginning of the list and put it at the end of the list. It is given that the list L contains the elements [1,2,3] and p points to 2 and q points to null.You must use both p and q.

Initial Setup Final Configuration

Your Answer:

Reset
Visualize

Feedback

Your feedback will appear here when you check your answer.