Follow the References!
Consider the following linked list:
![](../../img/07/image-20200917113326876.png)
Exercise In each case, draw a schematic representation of the linked list after the statement is executed. For each statement, start with the linked list displayed above.
head = head.next;
Solution
![](../../img/07/image-20200917113412161.png)
We effectively removed the first element!
head.next = head.next.next;
Solution
![](../../img/07/image-20200917113442794.png)
We effectively removed the second element!
head.next.next.next.next = head;
Solution
![](../../img/07/image-20200917113518867.png)
We effectively created a circular linked list!