Queues Flashcards
1
Q
Define Queue
A
- abstract data type that holds an ordered, linear sequence of items.
- pointer for front and rear
- FIFO
2
Q
Define Priority Queue
A
- each element has a priority
- inserted ahead of those with lower priority and behind those of an equal priority.
3
Q
Operations of priority queue
A
- enqueue()
- dequeue()
- is_empty()
- is_full()
4
Q
Define Circular queue
A
- reuses empty slots at the front of the array
- wraps around as items are enqueued or dequeue
- front and rear pointers
- if front = rear, queue is empty
- if rear -1 from front, queue is full
5
Q
Applications of queues
A
- print tasks (print queue)
- tasks in order of priority