What is Queue ? Examples of Queue ?
- Stores a set of elements in a particular
order
- Stack principle: FIRST IN
FIRST OUT
- = FIFO
- It means: the first element inserted is
the first one to be removed
- Example
The first one in line is the first one to
be served
Real life examples
- Waiting
in line
- Waiting
on hold for tech support
Applications related to Computer Science
- Threads
- Job
scheduling (e.g. Round-Robin algorithm for CPU allocation)
No comments:
Post a Comment