Using only Stack commands (push and pop) implement a Queue. You can use more tha
ID: 3834663 • Letter: U
Question
Using only Stack commands (push and pop) implement a Queue. You can use more than one stack but your final code must implement a single object that implements Enqueue and Dequeue operations. Note internally you must implement the enqueue and dequeue operations using only push and pop commands of the internal objects of the Queue. You may start with my base code for this programming problem it is at https://jsfiddle.net/reaglin/y2uxL2yn/ If you use my code make sure you are logged in to JSFiddle and you Fork the code over to your own. With way the structure of my code will make understanding what to do here a lot easier. Note – this is NOT the most efficient way to create a Queue. Provide a link to your completed fiddle
Explanation / Answer
Hey there,
I hope this is the answer. There are a few other ways, but then I thought lecturer's don't usually go that deep. So if its a different way lemme know. Have a great day.
Cheers,
Primehero
https://jsfiddle.net/primehero/74xv716u/2/
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.