notes:data:spring2024:projects:waq0
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
notes:data:spring2024:projects:waq0 [2024/04/16 13:53] – [Function to Create a Queue] rspringe | notes:data:spring2024:projects:waq0 [2024/04/16 14:00] (current) – [FIFO] rspringe | ||
---|---|---|---|
Line 4: | Line 4: | ||
====FIFO==== | ====FIFO==== | ||
+ | FIFO stands for "First In First Out", and it is the way that data is removed from a queue. | ||
+ | If the Stack can be thought of as a stack of papers, then a queue can be thought of as a line at a bank or at a grocery store checkout. | ||
+ | |||
+ | For a stack of papers, if you wanted to place a new paper on the stack, then you would put it on top of the stack. Then, if you wanted to take a sheet of paper, then you would generally take one from the top of the stack, leaving the bottom of the stack as it was. | ||
+ | |||
+ | For a line of people, anyone new who joins the line will have to stop and wait at the end of the line. Then, when the next person is called from the line, the person who is waiting at the very front of the line will go forward and leave the queue. | ||
====Function to Create a Queue==== | ====Function to Create a Queue==== | ||
Here is what the pseudocode for creating a basic doubly linked queue would look like: | Here is what the pseudocode for creating a basic doubly linked queue would look like: |
notes/data/spring2024/projects/waq0.txt · Last modified: 2024/04/16 14:00 by rspringe