choiceA - SLNode temp = myFront.getSuccessor(); myFront.getSuccessor().getSuccessor().getSuccessor().setSuccessor(temp); myFront.setSuccessor(temp.getSuccessor()); temp.setSuccessor(null); temp = null; choiceB - SLNode temp = myFront.getSuccessor(); myFront.getSuccessor().getSuccessor().setSuccessor(temp); myFront.setSuccessor(temp.getSuccessor()); temp.setSuccessor(null); temp = null; choiceC- SLNode temp = myFront.getSuccessor(); myFront.getSuccessor().getSuccessor().getSuccessor().setSuccessor(temp); myFront.getSuccessor().setSuccessor(temp.getSuccessor()); temp.setSuccessor(null); temp = null; choiceD- SLNode temp = myFront; myFront.getSuccessor().getSuccessor().getSuccessor().setSuccessor(temp); myFront.setSuccessor(temp.getSuccessor()); temp.setSuccessor(null); temp = null;
choiceA - SLNode<Integer> temp = myFront.getSuccessor();
myFront.getSuccessor().getSuccessor().getSuccessor().setSuccessor(temp);
myFront.setSuccessor(temp.getSuccessor());
temp.setSuccessor(null);
temp = null;
choiceB - SLNode<Integer> temp = myFront.getSuccessor();
myFront.getSuccessor().getSuccessor().setSuccessor(temp);
myFront.setSuccessor(temp.getSuccessor());
temp.setSuccessor(null);
temp = null;
choiceC- SLNode<Integer> temp = myFront.getSuccessor();
myFront.getSuccessor().getSuccessor().getSuccessor().setSuccessor(temp);
myFront.getSuccessor().setSuccessor(temp.getSuccessor());
temp.setSuccessor(null);
temp = null;
choiceD- SLNode<Integer> temp = myFront;
myFront.getSuccessor().getSuccessor().getSuccessor().setSuccessor(temp);
myFront.setSuccessor(temp.getSuccessor());
temp.setSuccessor(null);
temp = null;
Step by step
Solved in 2 steps