All Topics  
Data structure

 

   Email Print
   Bookmark   Link






 

Data structure



 
 
A data structure in computer science is a way of storing data in a computer so that it can be used efficiently. It is an organization of mathematical and logical concepts of data. Often a carefully chosen data structure will allow the most efficient algorithm
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. The two most frequently encountered are...
 to be used. The choice of the data structure often begins from the choice of an abstract data type. A well-designed data structure allows a variety of critical operations to be performed, using as few resources, both execution time and memory space, as possible.






Discussion
Ask a question about 'Data structure'
Start a new discussion about 'Data structure'
Answer questions from other users
Full Discussion Forum



Recent Posts









Encyclopedia


A data structure in computer science is a way of storing data in a computer so that it can be used efficiently. It is an organization of mathematical and logical concepts of data. Often a carefully chosen data structure will allow the most efficient algorithm
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. The two most frequently encountered are...
 to be used. The choice of the data structure often begins from the choice of an abstract data type. A well-designed data structure allows a variety of critical operations to be performed, using as few resources, both execution time and memory space, as possible. Data structures are implemented by a programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
 as data types and the references
Reference (computer science)

In computer science, a reference is an object containing information about how to locate and access the particular data item, as opposed to containing the data itself....
 and operations they provide.

Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to certain tasks. For example, B-trees
B-tree

In computer science, a B-tree is a tree data structure that keeps data sorted and allows searches, insertions, and deletions in logarithmic Amortized analysis....
 are particularly well-suited for implementation of databases, while networks of machines rely on routing tables to function.

In the design of many types of computer program, the choice of data structures is a primary design consideration. Experience in building large systems has shown that the difficulty of implementation and the quality and performance of the final result depends heavily on choosing the best data structure. After the data structures are chosen, the algorithms to be used often become relatively obvious. Sometimes things work in the opposite direction — data structures are chosen because certain key tasks have algorithms that work best with particular data structures. In either case, the choice of appropriate data structures is crucial.

This insight has given rise to many formalized design methods and programming languages in which data structures, rather than algorithms, are the key organizing factor. Most languages feature some sort of module system, allowing data structures to be safely reused in different applications by hiding their verified implementation details behind controlled interfaces. Object-oriented programming languages
Object-oriented programming language

An object-oriented programming language is one that allows or encourages, to some degree, object-oriented programming techniques such as Information hiding, Inheritance , module , and Polymorphism ....
 such as C++ and Java
Java (programming language)

Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java ....
 in particular use classes
Class (computer science)

In object-oriented programming, a class is a programming language construct that is used as a blueprint to create Object s. This blueprint includes Attribute s and Method s that the created objects all share....
 for this purpose.

Since data structures are so crucial, many of them are included in standard libraries of modern programming languages and APIs
Application programming interface

An application programming interface is a set of subroutine, data structures, class and/or Protocol provided by library and/or operating system Service s in order to support the building of applications....
, such as C++'s containers
Standard Template Library

The Standard Template Library is a Library partially included in the C++ C++ standard library. It provides Container s, iterators, algorithms, and Function objects....
, the Java Collections Framework
Java collections framework

JCF redirects here and can also stand for Jordan normal form in Linear AlgebraThe Java programming language collections framework is a coupled set of class and interface ...
, and the Microsoft .NET Framework
.NET Framework

The Microsoft .NET Framework is a software framework that is available with several Microsoft Windows operating systems. It includes a large Library of coded solutions to prevent common programming problems and a virtual machine that manages the execution of programs written specifically for the Software framework....
.

The fundamental building blocks of most data structures are arrays, records
Record (computer science)

In computer science, a record type or struct is a type whose values are records, i.e. aggregates of several items of possibly different types....
, discriminated unions
Tagged union

In computer science, a tagged union, also called a variant type, variant record, discriminated union, or disjoint union, is a data structure used to hold a value that could take on several different, but fixed types....
, and references
Reference (computer science)

In computer science, a reference is an object containing information about how to locate and access the particular data item, as opposed to containing the data itself....
. For example, the nullable reference, a reference which can be null, is a combination of references and discriminated unions, and the simplest linked data structure, the linked list, is built from records and nullable references.

Data structures represent implementations or interfaces
Interface (computer science)

Interface generally refers to an Abstraction_%28computer_science%29 that an entity provides of itself to the outside. This separates the methods of external communication from internal operation, and allows it to be internally modified without affecting the way outside entities interact with it, as well as provide Polymorphism in object-orien...
: A data structure can be viewed as an interface between two functions or as an implementation of methods to access storage that is organized according to the associated data type.

See also

  • List of data structures
    List of data structures

    This is a list of data structures. For a wider list of terms, see list of terms relating to algorithms and data structures.Base Data Structures...
  • Data model
    Data model

    A data model in software engineering is an abstract model that describes how Data is represented and accessed. Data models formally define data elements and relationships among data elements for a domain of interest....
  • Data modeling
    Data modeling

    Data modeling in software engineering is the process of creating a data model by applying formal data model descriptions using data modeling techniques....
  • Dynamization
    Dynamization

    In computer science, Dynamization is the process of transforming a static data structure into a dynamic data structure one. Although static data structures may provide very good functionality and fast queries, their utility is limited because of their inability to grow/shrink fast, thus making them inapplicable for the solution of dynamic pro...
  • Persistent data structure
    Persistent data structure

    In computing, a persistent data structure is a data structure which always preserves the previous version of itself when it is modified; such data structures are effectively immutable, as their operations do not update the structure in-place, but instead always yield a new updated structure....


External links

  • from the Dictionary of Algorithms and Data Structures
    Dictionary of Algorithms and Data Structures

    The Dictionary of Algorithms and Data Structures is a dictionary style reference for many algorithms, "algorithmic techniques", "archetypal problems" and data structures found in the field of Computer Science....