q (Queue)
A queue (often represented as "q") is a data structure that follows the First-In-First-Out (FIFO) principle. This means that the first element added to the queue will be the first one to be removed. Queues are commonly used in various applications, such as managing tasks in operating systems or handling requests in web servers.
In a queue, elements are added at the back (enqueue) and removed from the front (dequeue). This structure is useful for scenarios where order matters, such as in print spooling or customer service lines. Queues can be implemented using arrays or linked lists, depending on the requirements.