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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started