Data structure
In computer science
Computer science
Computer science or computing science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems...

, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently
Algorithmic efficiency
In computer science, efficiency is used to describe properties of an algorithm relating to how much of various types of resources it consumes. Algorithmic efficiency can be thought of as analogous to engineering productivity for a repeating or continuous process, where the goal is to reduce...


Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks. For example, B-tree
In computer science, a B-tree is a tree data structure that keeps data sorted and allows searches, sequential access, insertions, and deletions in logarithmic time. The B-tree is a generalization of a binary search tree in that a node can have more than two children...

s are particularly well-suited for implementation of databases, while compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

 implementations usually use hash table
Hash table
In computer science, a hash table or hash map is a data structure that uses a hash function to map identifying values, known as keys , to their associated values . Thus, a hash table implements an associative array...

s to look up identifiers.

Data structures are used in almost every program or software system.