Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Form a model of double-linked circular list, make a description of it and develo

ID: 1947521 • Letter: F

Question

Form a model of double-linked circular list, make a description of it and develope list processing
operations:
a) Findith (advanced algorithm), InsertBefore, Delete (next element becomes a new current
element);
b) FindKey, InsertAfter, Update;
c) FindLast, Terminate, Delete (previous element becomes a new current element);
d) InsertBefore (not reduced to InsertAfter), Findkey, FindFirst.

Explanation / Answer

void CircularDLL::insertAfterLast (int id, string name, string email, int age) { Node* N=new Node; N->stId=id; N->stName=name; N->stEmail=email; N->stAge=age; Node* Q=top; while(Q->next!=top)//get to the last node { Q=Q->next; } coutprev=N; }