O'Reilly logo

Introducing Data Structures with Java by David Cousins

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

10

Queues

Queues Queues

Contents

  • Queues as data structures
  • Queue operations—initialize, en-queue, de-queue
  • Implementing a queue as a class—two versions
  • Priority queues
10.1 INTRODUCTION

Linked lists are useful for applications where frequent deletion and insertion of data occurs. A related structure is one where addition and deletion take place in a special manner. It is a ‘queue’; entering a cinema or sports event or boarding a bus is—or should be—an orderly process operating to the rule ‘first in, first out’ (FIFO). The first person joins an empty queue and will be first to leave it; others join behind at the tail. While queues have some of the ...

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