Chapter 4. C Data Structures

The ignoring of data is, in fact, the easiest and most popular mode of obtaining unity in one's thought.

—William James

Programs work by applying algorithms on data. The internal organization of data plays an important role in how algorithms operate.

You will find elements with the same type organized as a collection using a number of different mechanisms, each having different affordances regarding data storage and access. A vector, implemented as an array, offers random access to all elements, but it can be inefficient to change in size at runtime. A vector can also be used to organize groups of elements in the form of a table or stacked into two dimensions to create a matrix. Operations on a vector are sometimes ...

Get Code Reading: The Open Source Perspective now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.