Question: In this assignment, you will implement a doubly-linked list class, together with some list operations. To make things easier, youll implement a list of int,

In this assignment, you will implement a doubly-linked list class, together with some list operations. To make things easier, youll implement a list of int, rather than a template class.

Can you guys, if you want, explain the steps you do to do the operators? ThanksIn this assignment, you will implement a doubly-linked list class, together with

II Must run in Un) time bool enpty) const; #pragma once dlist.h Doubly-1inked lists of ints private: node* head nullptr; node* tailnullptr; class dlist f public: Add any other private members you need dlist) struct node Inplement ALL the folloving functions* int value node* next; node* prev; Compares two lists for equality, returning true if they have the same elenents in the sase positions. (Hint: it is "not" enough to just compare pointers! You have to compare the values stored In the nodes.) node* head() const return _head; ) node* tail() constreturn tail; ) ust run in O(m) tine, where a is the length of the shorter of the two lists Iaplement ALL the following nethods * bool operator (const dlist& a, const dlist b) Returns the node at a particular index (8 is the head). If n size) // return nullptr; if n

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!