| Exercise | Initial Setup | Final Configuration |
| 1 |
Use a single assignment statement to make the variable p refer to the Node with info '2'.
| Ready to solve it? |

|
|
 |  |
| 2 |
Redo exercise 1 but, this time, your assignment statement must refer to both variables p and q.
| Ready to solve it? |

|
|
 |
 |
| 3 |
Use a single assignment statement to make the variable q refer to the Node with info '1'.
| Ready to solve it? |

|
|
 |
 |
| 4 |
Use a single assignment statement to make the variable r refer to the Node with info '2'.
| Ready to solve it? |

|
|
 |
 |
| 5 |
Use a single assignment statement to set the info of the Node referred to by p equal to the info of the Node referred to by r (you must access this info through r; do not refer to the character '3' directly).
| Ready to solve it? |

|
|
 |
 |
| 6 |
Redo exercise 5 by referring only to variable p (not to variable r). Again, you may not refer to the character '3' directly .
| Ready to solve it? |

|
|
 |
 |
| 7 |
Write a single assignment statement to transform the linked list headed by p into a circular linked list. Your assignment statement must refer to both variables p and r.
| Ready to solve it? |

|
|
 |
 |
| 8 |
Redo exercise 7 but, this time, your assignment statement must refer to both variables p and q.
| Ready to solve it? |

|
|
 |
 |
| 9 |
Redo exercise 7 but, this time, your assignment statement must refer only to variable p.
| Ready to solve it? |

|
|
 |
 |
| 10 |
Write a single assignment statement to remove the Node with info 'B' from the linked list headed by p. Your assignment statement must refer to both variables p and q.
| Ready to solve it? |

|
|
 |
 |
| 11 |
Write a single assignment statement to remove the Node with info 'B' from the linked list headed by p.
| Ready to solve it? |

|
|
 |
 |
| 12 |
Write a while loop to make q refer successively to each Node in the linked list headed by p. q must end up referring to the last Node in the list.
| Ready to solve it? |

|
|
 |
 |
| 13 |
Write a while loop to make q refer successively to each Node in the linked list headed by p until q refers to the first Node with info (lowercase) 'c'.
| Ready to solve it? |

|
|
 |
 |
| 14 |
Use four assignment statements, each referring to variable p, to create a linked list headed by p and containing 4 Nodes with info 'A', 'B', 'C', and 'D', in this order.
| Ready to solve it? |

|
|
 |
 |
| 15 |
Create a new Node with info 'A' and insert it at the beginning of the list headed by p.
| Ready to solve it? |

|
|
 |
 |
| 16 |
Create a new Node with info 'D' and insert it at the end of the list headed by p.
| Ready to solve it? |

|
|
 |
 |
| 17 |
Remove the Node at the beginning of the list headed by p and insert it at the end of the same list. Your program must refer to both variables p and q.
| Ready to solve it? |

|
|
 |
 |
| 18 |
Redo exercise 17 but, this time, your program must only refer to variable p.
| Ready to solve it? |

|
|
 |
 |
| 19 |
Merge the two lists headed by p and q into a single list headed by p in which the Nodes are sorted in alphabetical order.
| Ready to solve it? |

|
|
 |
 |
| 20 |
Using only the three existing variables p, q, and r, reverse
the order of the Nodes in the list headed by p.
| Ready to solve it? |

|
|
 |
 |