<aside>
<img src="/icons/home_green.svg" alt="/icons/home_green.svg" width="40px" />
Back to Home
</aside>
https://jennychen9827sbu.github.io/CAD281/dataStructure.html
What Is a Data Structure?
A data structure is a way to store, organize, and manage data so that it can be used efficiently.
In C, data structures can be:
- Built-in: arrays, pointers
- User-defined:
struct, union, enum
- Abstract types: stack, queue, linked list, etc.
❓ Why Use Data Structures?
- To group related data (e.g., student info: name, id, GPA)
- To perform efficient operations (insert, delete, search)
- To model real-world problems (queues in printers, stacks in undo)
When to Use Data Structures?
- When you need to store multiple values
- When data has relationships (e.g., tree or graph)
- When performance (speed or memory) matters