> For the complete documentation index, see [llms.txt](https://university-west.gitbook.io/programming-paradigms/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://university-west.gitbook.io/programming-paradigms/programming-fundamentals/data-structures.md).

# Data structures

Data structures are a way of organizing and storing data in a computer so that it can be accessed and modified efficiently. Different types of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks.

#### Types of Data Structures

* **Primitive Data Structures (Datatypes)**: These are the basic data types like int, char, float, and boolean that serve as the building blocks for data manipulation.
* **Composite Data Structures (Datatypes)**: These are made up of primitive data types or other data structures. Examples include arrays, structures, and classes.
* **Abstract Data Types (ADT)**: These are more theoretical concepts of data structures that include Lists, Stacks, Queues, Trees, Graphs, Sets, and Maps.

#### Key Operations on Data Structures

* **Insertion**: Adding a new data element to the structure.
* **Deletion**: Removing an element from the structure.
* **Traversal**: Accessing and/or printing all the elements.
* **Searching**: Finding a specific element.
* **Sorting**: Arranging elements in a certain order.
* **Access**: Retrieving an element at a given position.

#### Importance of Data Structures

Data structures are crucial because they provide a means to manage huge amounts of data efficiently, such as large databases and internet indexing services. Choosing the appropriate data structure for a task can enhance a program's performance in terms of time and memory usage.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://university-west.gitbook.io/programming-paradigms/programming-fundamentals/data-structures.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
