User Tools

Site Tools


notes:data:fall2023:projects:waq0

This is an old revision of the document!


Queue

While stacks followed LIFO (last in first out) queues follow FIFO (First in First out).

Queue Struct

Here is a simple struct you can implement for your queue structure:

struct queue {
    cardnode* front;  // Pointer to the front of the queue
    cardnode* rear;   // Pointer to the rear of the queue
    int size;         // Size of the queue
};

The provided struct consists of a front and rear pointer of a queue along with a size variable.

notes/data/fall2023/projects/waq0.1699237212.txt.gz · Last modified: 2023/11/06 02:20 by wgates1