Question: double salary struet NODE DAT data; Node N Node P; Node{const int i , const char-t, const double s ) Do strepyldata fuliname, data.salarys; N
double salary struet NODE DAT data; Node "N Node "P; Node{const int i , const char-t, const double s ) Do strepyldata fuliname, data.salarys; N NULL; P NULL; class PQueueLinkedList NODE-front; NODE "back; public: PQueueLinkedListoffront NULL:back NULL:) -PQueuelLinkedList(HdestroyList)) NODE" dequeueD void destroyList); )i vold PQueueLinkedList:zenqueue(NODE "n) infront NULL) queue has one node. front-n back s n elseliqueue has more than one node. #1 f nodata.id tempodataied) INew node if's is greater than all ohers. front-2P = n; nsN front; front# n; else Search for the position for the new node. whilef n->data.id c temp->data.id) ifttempsN NULL) break; temp = temp->N; /New node id's smallest than all others iftemp->NNULL&&n->data.id data.id) double salary struet NODE DAT data; Node "N Node "P; Node{const int i , const char-t, const double s ) Do strepyldata fuliname, data.salarys; N NULL; P NULL; class PQueueLinkedList NODE-front; NODE "back; public: PQueueLinkedListoffront NULL:back NULL:) -PQueuelLinkedList(HdestroyList)) NODE" dequeueD void destroyList); )i vold PQueueLinkedList:zenqueue(NODE "n) infront NULL) queue has one node. front-n back s n elseliqueue has more than one node. #1 f nodata.id tempodataied) INew node if's is greater than all ohers. front-2P = n; nsN front; front# n; else Search for the position for the new node. whilef n->data.id c temp->data.id) ifttempsN NULL) break; temp = temp->N; /New node id's smallest than all others iftemp->NNULL&&n->data.id data.id)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
