| Share this post! | Vote this! |
|
Queues
are data structures that, like the stack, have restrictions on where you can
add and remove elements. To understand a queue, think of a cafeteria line: the
person at the front is served first, and people are added to the line at the
back. Thus, the first person in line is served first, and the last person is
served last. This can be abbreviated to First In, First
Out (FIFO).
The cafeteria line is one type of queue. Queues are often used in programming networks, operating systems, and other situations in which many different processes must share resources such as CPU time.
One bit of terminology: the addition of an element to a queue is known as an enqueue, and removing an element from the queue is known as a dequeue. more...
The cafeteria line is one type of queue. Queues are often used in programming networks, operating systems, and other situations in which many different processes must share resources such as CPU time.
One bit of terminology: the addition of an element to a queue is known as an enqueue, and removing an element from the queue is known as a dequeue. more...



0 comments:
Post a Comment