Question: addAtFront ( Node , int ) : Node When called and passed a reference to the head Node of a linked list and an int
addAtFrontNode int : Node When called and passed a reference to the head Node of a linked list and an int value to add to the list, this method will create a new Node object to store the int value, and will then make this Node the new head Node for this linked list. This method must return a reference to the new head Node.
printListNode When called and passed a reference to the head Node of a linked list, this method will print out a comma separated list of the int values in the linked list. This method will not return anything.
The printed output must be formatted like the following examples:
getSizeNode : int When called and passed a reference to the head Node of a linked list, this method must compute and return the number of nodes in the list.
addToEndNode int : Node When called and passed a reference to the head Node of a linked list and an int value to add to the list, this method will create a new Node object to store the int value, and then will make this Node the new last Node in this linked list.
This method must return a reference to the head Node of the list.
removeFromFrontNode : Node When called passed a reference to the head Node of the linked list, this method will remove the current head node of the list and return a reference to the new head Node.
removeFromEndNode : Node When called and passed a reference to the head Node of a linked list, this method will remove the last Node of the list and return a reference to the head Node.
insertAtIndexNode int, int : Node The first argument will be the head of a linked list.
The second argument will be the zerobased index where the new value should be inserted.
The third argument will be the new value to be inserted into the list.
When called and passed a reference to the head Node of a linked list, an index, and a new int value, this method must make a new Node to store the new int value, and insert the node at the correct index in the list.
This method must return a reference to the head Node of the list.
removeAtIndexNode int : Node The first argument will be the head of a linked list.
The second argument will be the zerobased index of the Node that should be removed.
When called and passed a reference to the head Node of a linked list, and an index, this method must remove the specified Node from the list.
This method must return a reference to the head Node of the list.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
