go to previous page   go to home page   go to next page

Answer:

At the top of the loop, which is the current node? The first node.

At the bottom of the loop, which is the current node? The second node.

Third node

At the bottom of the loop, after the first iteration, the second node of the list looks just like the first node did at the top of the loop. Another iteration of the loop attaches the third node to the second node.

At bottom of first loop iteration:
   
At bottom of second loop iteration:    
   
At bottom of third loop iteration:    

Of course, now the third node is the current node and has the same relationship to its predecessor and to $s1 as did the second node when it was the current node.

QUESTION 14:

Look at the current node (the last one) in each diagram. What does a current node look like in general?