Question: (IMPORTANT!!!!) Write a method removefirsthalf(DoublyLinkedList < E > myList) that receives a doubly linked list and removes the first half of its nodes, if the

(IMPORTANT!!!!) Write a method removefirsthalf(DoublyLinkedList< E > myList) that receives a doubly linked list and removes the first half of its nodes, if the number of nodes is odd, it will remove all nodes before the one in the middle.

so if the list has nodes with the following data : A B C D , then after calling this method, the list will have C D

if the list has nodes with the following data : A B C D E, then after calling this method, the list will be C D E

Note: this method is not inside the class DoublyLinkedList, assume it is in the test class.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!