X399: changePointeeDataInDirect

Consider the following class definition:
   class Link{
      Object data;
      Link next;
   }
Use a single assigment to set the info of the Node referred to by p equal to 3 without using the value of the node pointed by r. It is given that the list L contains the elements [1,2,3] and p points to 1 and r points to 3.

Initial Setup Final Configuration

Your Answer:

Reset
Visualize

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.