Question: Implement a doubly linked list class. The class must use a template to allow for this container to be created for any data type. The

 Implement a doubly linked list class. The class must use atemplate to allow for this container to be created for any data

Implement a doubly linked list class. The class must use a template to allow for this container to be created for any data type. The implementation must be done with linked lists. A head and tail pointer should be maintained for efficiency. Creating a variable should look like LinkedList x; template struct LLNode DATATYPE data; LLNode LLNode *next; *prev ; template class LinkedList private: //use a doubly linked-list based implementation //keep a head and tail pointer for efficiency LLNode-DATATYPE *Head; LLNode&) //Inequality operator to check if two lists are equal bool operator!=( const LinkedList&); //add x to front of list void addFront (DATATYPE); //add x to back of list

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!