Chapter 1 Introduction to Essential Cell Biology
What is a Data Structure?
A data structure is a specialized format for organizing, processing, and storing data. It determines:
- How data is arranged in memory
- What operations can be performed efficiently
- The time and space complexity of those operations
Common Data Structures
Arrays
- Contiguous memory
- O(1) access, O(n) insertion/deletion
Linked Lists
- Non-contiguous memory with pointers
- O(n) access, O(1) insertion/deletion (if position known)
Trees
- Hierarchical organization
- Balance affects performance
Important Design Principle
Choose your data structure based on the operations you’ll perform most frequently.