Data Structure

Data structure refers to a programmatic scheme for organizing related pieces of information. It determines the way a computer program accesses, processes, and stores data. Some programming languages inherently support data structures, whereas other languages require an external library to use a data structure.

Types of data structures

The list below contains some of the most common data structures. Each type has many variations that allow an end user to perform different sets of operations on the data.

Arrays

Array structures contain a linear sequence of data, usually of a singular type. Arrays typically use a zero index, meaning the first element is assigned an index of 0, the second element an index of 1, and so on. To access a specific piece of data in the array, a user must know its index number.

Hash tables

A hash table or hash map is a non-linear data structure in which each element is assigned a unique computer hash. The hashes are usually of a fixed length and are produced using a predetermined key. Data lookups can be completed using a known hash or the key, which makes it an extremely efficient method of accessing large volumes of data.

Stacks/queues

Stacks and queues are linear sequences of data similar to arrays. With these types, however, the way the data is organized depends on when each piece was added to the data set. Stacks use a “last in first out” (LIFO) structure where the last element added is the first one removed. Queues use a similar approach with a “first in first out” (FIFO) structure instead, meaning the newest elements are added to the end of the sequence instead of the beginning.

Linked lists

A linked list is another linear sequence of data where the physical order of the data does not match the sequence. Instead, each element contains a “pointer” that indicates the next element in the sequence. This means all data in the list must be accessed in order, which makes it less efficient for large sets of data than other structures.

Trees

Trees are non-linear data structures based on a series of parent-child relationships. Data in these structures is accessed by starting with a single root node and following each branch until it ends with a single leaf node. These types of structures are common for establishing a hierarchy in wireless networks.

Graphs

Graph structures are non-linear sequences that are organized according to each element’s spatial relationship. Each graph contains a finite number of elements, either vertices (points on the graph) or the edges that connect them. The order in which data is accessed depends on the type of graph.

This article was updated April 2021 by Kaiti Norton.

Vangie Beal
Vangie Beal
Vangie Beal is a freelance business and technology writer covering Internet technologies and online business since the late '90s.

Related Articles

Merkle Tree

Merkle trees—or hash trees—are cryptographic algorithms allowing for the efficient validation of large data structures and are critical to the development of secure computing...

Product Manager

A product manager is someone involved in all areas of production, including setting...

Kintone

Companies looking for a business process management or customer relationship management (CRM) tool...

Geotargeting

Geotargeting is a method of delivering data or content to users based on...