Data Structure
Noun · Development
Definitions
A data structure is a specialized format for organizing, storing, and accessing data efficiently in a computer program. Different data structures are optimized for different operations: arrays provide fast random access by index, linked lists allow efficient insertions and deletions, hash tables enable near-constant-time lookups by key, trees maintain sorted data for fast search and range queries, and graphs model relationships between entities. Choosing the right data structure is one of the most impactful decisions a programmer makes, as it directly affects the time and space complexity of the algorithms that operate on the data. Stacks and queues enforce specific access patterns (last-in-first-out and first-in-first-out, respectively), heaps efficiently track minimum or maximum values, and tries optimize prefix-based string operations. Advanced data structures like B-trees power database indexes, bloom filters provide probabilistic membership testing, and skip lists offer a simpler alternative to balanced trees. Understanding data structures and their tradeoffs is fundamental to computer science and a core topic in technical interviews.
In plain English: A way of organizing data in a computer so it can be used efficiently, like choosing between a filing cabinet, a stack of papers, or a rolodex depending on how you need to find things.