O'Reilly logo

C Interfaces and Implementations: Techniques for Creating Reusable Software by David R. Hanson - Princeton University

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 11. Sequences

A sequence holds N values associated with the integer indices zero through N–1 when N is positive. An empty sequence holds no values. Like arrays, values in a sequence may be accessed by indexing; they can also be added to or removed from either end of a sequence. Sequences expand automatically as necessary to accommodate their contents. Values are pointers.

Sequences are one of the most useful ADTs in this book. Despite their relatively simple specification, they can be used as arrays, lists, stacks, queues, and deques, and they often subsume the facilities of separate ADTs for these data structures. A sequence can be viewed as a more abstract version of the dynamic array described in the previous chapter. A sequence hides ...

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