Implementing a Doubly Linked List

10.00 $ 5.00 $

Categories: ,
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . zip solution files instantly, after Payment


5/5 - (4 votes)
Modify the class Linked List in Exercise 1 to make it a Doubly Linked List. Name your class DoublyLinkedList. Add a method addEndto add an integer at the end of the list and a method displayInReverse to print the list backwards.

void addEnd(int x): create this method to add x to the end of the list.

void displayInReverse(): create this method to display the list elements from the last item to the first one.

Create a main() function to test your DoublyLinkedList class.