Browse Definitions:
Definition

# sorting algorithm

Contributor(s): Ivy Wigmore

A sorting algorithm is a method for reorganizing a large number of items into a specific order, such as alphabetical, highest-to-lowest value or shortest-to-longest distance. Sorting algorithms take lists of items as input data, perform specific operations on those lists and deliver ordered arrays as output. The many applications of sorting algorithms include organizing items by price on a retail website and determining the order of sites on a search engine results page (SERP).

A few examples of sorting algorithms:

• The bubble sort algorithm repeatedly proceeds through the list, comparing pairs of adjacent items and exchanging their positions if they are in the wrong order. The algorithm passes through the list in that way until the entire list has been sorted.
• The insertion sort algorithm starts by putting the first two items in order and then compares the third item with the second one, swapping positions if necessary and repeats that action with the first item. Subsequent items subjected to the same process often don't have to be moved far through the sorted items.
• The Shell sort algorithm compares and sorts items at intervals, decreasing the size of the interval at each pass through the list. The final passes through are a bubble sort but it's much faster because items are already closer to their desired positions.
• The quicksort algorithm selects a random item in the list, compares all the other items to it and organizes them into those that belong before the selected item and those that belong after it. That means that none of the items have to be compared with those in the other group again. The method proceeds by selecting random items within those two groups of items and repeating the process. Eventually, some other method such as the insertion algorithm does the final sorting.

This TED-ED presentation compares sorting algorithms:

This was last updated in October 2017

#### Start the conversation

Send me notifications when other members comment.

## SearchCompliance

• ### risk map (risk heat map)

A risk map, also known as a risk heat map, is a data visualization tool for communicating specific risks an organization faces. A...

• ### internal audit (IA)

An internal audit (IA) is an organizational initiative to monitor and analyze its own business operations in order to determine ...

• ### pure risk (absolute risk)

Pure risk, also called absolute risk, is a category of threat that is beyond human control and has only one possible outcome if ...

## SearchSecurity

• ### federated identity management (FIM)

Federated identity management (FIM) is an arrangement that can be made among multiple enterprises to let subscribers use the same...

• ### cross-site scripting (XSS)

Cross-site scripting (XSS) is a type of injection security attack in which an attacker injects data, such as a malicious script, ...

• ### firewall

In computing, a firewall is software or firmware that enforces a set of rules about what data packets will be allowed to enter or...

## SearchHealthIT

• ### 21st Century Cures Act

The 21st Century Cures Act is a wide-ranging healthcare bill that funds medical research and development, medical device ...

• ### vendor neutral archive (VNA)

A vendor neutral archive (VNA) is a technology that stores medical images in a standard format and interface, making them ...

• ### HITECH (Health Information Technology for Economic and Clinical Health) Act of 2009

The HITECH (Health Information Technology for Economic and Clinical Health) Act of 2009 is legislation that was created to ...

## SearchDisasterRecovery

• ### business continuity and disaster recovery (BCDR)

Business continuity and disaster recovery (BCDR) are closely related practices that describe an organization's preparation for ...

• ### business continuity plan (BCP)

A business continuity plan (BCP) is a document that consists of the critical information an organization needs to continue ...

• ### call tree

A call tree -- sometimes referred to as a phone tree -- is a telecommunications chain for notifying specific individuals of an ...

## SearchStorage

• ### all-flash array (AFA)

An all-flash array (AFA), also known as a solid-state storage disk system, is an external storage array that uses only flash ...

• ### volume manager

A volume manager is software within an operating system (OS) that controls capacity allocation for storage arrays.

• ### external storage device

An external storage device, also referred to as auxiliary storage and secondary storage, is a device that contains all the ...

## SearchSolidStateStorage

• ### hybrid hard disk drive (HDD)

A hybrid hard disk drive is an electromechanical spinning hard disk that contains some amount of NAND Flash memory.

Close