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?
4 odpowiedzi
0
Have you tried using a search engine to find some examples?
0
Yes I did but I didn't find how to use both at the same time on the CMD terminal.
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
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).