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 is a freelance business and technology writer covering Internet technologies and online business since the late '90s.

Top Articles

The Complete List of 1500+ Common Text Abbreviations & Acronyms

From A3 to ZZZ we list 1,559 SMS, online chat, and text abbreviations to help you translate and understand today's texting lingo. Includes Top...

Windows Operating System History & Versions

The Windows operating system (Windows OS) refers to a family of operating systems developed by Microsoft Corporation. We look at the history of Windows...

How to Create a Website Shortcut on Your Desktop

Website Shortcut on Your Desktop reviewed by Web Webster   This Webopedia guide will show you how to create a website shortcut on your desktop using...

Generations of Computers (1st to 5th)

Reviewed by Web Webster Learn about each of the 5 generations of computers and major technology developments that have led to the computing devices that...

Blockchain

Blockchain is one of the core technologies behind cryptocurrency. Blockchain is a system...

Cached Data

Cached data is designed to improve the user experience when browsing the internet...

CCTV (Closed-Circuit Television)

A CCTV or closed-circuit television is a system of interconnected cameras that capture...