0

How can I use stack and queue both on a linked list for making a real world problem solution?

Please explain through examples and codes?

15th May 2022, 4:09 AM
Rafid
Rafid - avatar
4 odpowiedzi
0
Have you tried using a search engine to find some examples?
15th May 2022, 5:57 AM
Chris Coder
Chris Coder - avatar
0
Yes I did but I didn't find how to use both at the same time on the CMD terminal.
15th May 2022, 6:04 AM
Rafid
Rafid - avatar
0
Given a linked list To implement stack: only add and remove from one end To implement a queue: add and remove from oppisiste ends A few computer problems include: - Graph traversals - Process scheduling - Computation order Define “real world” problems
15th May 2022, 6:28 AM
Raul Ramirez
Raul Ramirez - avatar
0
A warehouse robot has been instructed to retrieve an item that is stored behind several other items in a storage compartment. To retrieve the desired item, first it must move the other items out of the way, one by one, into another available compartment. (This is a stack). Then it is instructed to place the desired item onto a conveyor that transports it to the shipping department in line behind other items being prepared for shipping. (This is a queue).
15th May 2022, 10:18 AM
Brian
Brian - avatar