The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 6 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Language: C++
A queue is a data structure where items can only be added to the end (enqueue) and items can only be removed from the front (dequeue). A queue can easily be implemented as a linked list. Write two functions (EnQueue and DeQueue) to perform each task respectively.
The node for the linked list will be very simple: an integer and a node pointer to point to the next node in the list
The EnQueue function parameters will be an integer value to add to the list and a Node pointer that points to the head of the list.
The DeQueue function will only have a Node pointer parameter (the head of the list).
Write a driver program to test the functions. A print function may be helpful for you to see if the EnQueue and DeQueue functions are working properly.
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll