Implement an instance method, called getFirstHalf, that belongs to your ThingLinkedBag. The method returns as output a linked list that includes all values in the first half of the bag's linked list....


Implement an instance method, called getFirstHalf, that belongs to your
ThingLinkedBag. The method returns as output a linked list that includes all
values in the first half of the bag's linked list. For example, for the following bag
3-->5-->8-->9. the method returns 3-->5.
If the bag includes an odd number of nodes, then the middle element belongs to
the first half and is included in the output.
Make sure to include the method
header. The bag should remain unchanged (i.e., do not remove the returned
values from the bag).



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here