O'Reilly logo

Developer’s Guide to Collections in Microsoft® .NET by Calvin “Lee” Janes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Understanding Collections: Queues, Stacks, and Circular Buffers

After completing this chapter, you will be able to

  • Identify queues, stacks, and circular buffers.

  • Design and implement queues, stacks, and circular buffers.

  • Understand when and when not to use queues, stacks, and circular buffers.

Queue Overview

A queue is a First In, First Out (FIFO) collection. A FIFO is a collection that resembles people waiting in a straight line. The first person to enter the line is the first person to leave the line. When the first people leave the line, they have been dequeued, or popped off the front of the queue, and as additional people join the line, they are enqueued, or pushed onto the back of the queue.

Uses of Queues

Queues are normally used when ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required