In computer science, data structures are abstract structures organized in particular way that are used to organize data and provide various operations upon it. Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks.
For example, relational databases most commonly use B-tree indexes for data retrieval, while compiler implementations usually use hash tables to look up identifiers. The most common and likely well-known data structure is the array, which contains a contiguous collection of data items that can be accessed by an ordinal index. Here is the list of other most common data structures:
An associative array (also called dictionary or map) is a more flexible variation on an array, in which name-value pairs can be added and deleted freely. A hash table is a common implementation of an associative array.
- A record (also called tuple or struct) is an aggregate data structure. A record is a value that contains other values, typically in fixed number and sequence and typically indexed by names. The elements of records are usually called fields or members.
- A union is a data structure that specifies which of a number of permitted primitive types may be stored in its instances, e.g. float or long integer. Contrast with a record, which could be defined to contain a float and an integer; whereas in a union, there is only one value at a time. Enough space is allocated to contain the widest member datatype.
- A set is an abstract data structure that can store specific values, in no particular order and with no duplicate values.
- A graph and a tree are linked abstract data structures composed of nodes. Each node contains a value and one or more pointers to other nodes arranged in a hierarchy. Graphs can be used to represent networks, while variants of trees can be used for sortingand searching, having their nodes arranged in some relative order based on their values.
- A class is a data structure that contains data fields, like a record, as well as various methods which operate on the contents of the record. In the context of object-oriented programming, records are known as plain old data structures to distinguish them from classes.
- Data structures are abstract structures organized in particular way that are used to organize data and provide various operations upon it.
- Most known data tructures: array, structure, class, set, hash table, graph.