Question: 1. [17 marks) Given the following list structure: template class Link { public: Elem element; // Value for this node Link *next; 77 Pointer to

 1. [17 marks) Given the following list structure: template class Link

1. [17 marks) Given the following list structure: template class Link { public: Elem element; // Value for this node Link *next; 77 Pointer to next node }; template class Llist : public List { private: Link* head; // Point to list header Link* tail; 1/ Pointer to last Elem Link* fence; 77 Last element on left bool insert (const Elem& item) { fence->next = new Link(item, fence->next); if (tail == fence) tail - fence->next; return true; } void print() const { Link Elem>* temp = head; cout next->element next; } cout next != NULL) { cout next->element next; } cout

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!