On part V of the practice final exam, what part of the code makes the node1c's go away after the next step while the node3c's don't in the last step?
Go look at the main method and what the methods are supposed to do. This should be obvious if you actually did and understood homework 4. Dawn Finney.
I have the same question. I don't see anything in the main method or the two repeat methods that say any nodes after the copies should be erased.
Would they still have disappeared had repeatNext() been called before repeatNextInserting()?
We have already described how both methods work in recitation and you should have learned them for homework 4. Both methods will insert copies of the node you specify but only repeatNextInserting properly saves the rest of the list. repeatNext will always kill the rest of the list. Dawn Finney
In Part II you write, node.setNext(head); head = node;
could you do this instead? setHead(node);
For the above, why do you need both lines for each option? Doesn't just the second line work on each option?
You have to look at the setHead method. It merely changes the head variable to point to whatever the parameter is. If you just did setHead, congrats you now have a list of one node, node. You have to point node to the rest of the list (make node's next equal to head) and then tell the linkedlist class okay I want the head of the list to be node now (make the head equal to node). Dawn Finney