(Insert/Delete Anywhere in a Linked List) Our linked-list class allowed insertions and deletions at only the front and the back of the linked list. These capabilities were convenient for us when we...



(Insert/Delete Anywhere in a Linked List)

Our linked-list class allowed insertions and deletions at only the front and the back of the linked list. These capabilities were convenient for us when we used inheritance or composition to produce a stack class and a queue class with minimal code simply by reusing the list class. Linked lists are normally more general than those we provided.Modify the linked-list class we developed in this chapter to handle insertions and deletions
anywhere
in the list. Create diagrams comparable to Figs. 21.6 (insertAtFront), 21.7 (insertAtBack), 21.8 (removeFromFront) and 21.9 (removeFromBack) that show how to insert a new node in the middle of a linked list and how to remove an existing node from the middle of a linked list.



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here