Sorting Algorithm

A sorting algorithm is a mathematical or logarithmic equation that organizes data structures in a computer program so that the system searches and finds data more efficiently. Many different sorting algorithms exist, and they’re based on different conditions and categories. Some sorting algorithms, due to what they prioritize, are better for different data arrays and situations than others. For instance, one algorithm may be much faster at sorting than another, but it’s also less stable, meaning that it will not keep a structure closest to its relative location to another structure. A slower algorithm (one that takes more time to sort through data) wouldn’t find things as quickly, but it might be more stable.

In sorting, time complexity is based on how many operations or actions (how much time) it takes to locate or arrange data structures in a search. Some types of algorithms are more efficient than others for searching. The letter O is used to indicate the time complexity component of sorting. The number of operations required to sort a data array does make a difference in search efficiency, especially if the system is searching through a large data pool.

Space complexity, on the other hand, is the amount of system power or memory an algorithm requires to run on the computer. This is also sometimes represented by O. There are mathematical ways to calculate the amount of computational memory required for a specific sorting algorithm.

Types of sorting algorithms

A wealth of sorting algorithms are available to database users. We’ve listed just a few:

  • Quick sort divides data into shorter arrays and sorts through them faster than going through just one list
  • Merge sort first splits the data array into two distinct arrays and sorts each half, then merges the data structures back into a single organized array
  • Insertion sort checks each structure (or item) one by one and moves it into position in the new order by comparing it to each other sequential structure


Jenna Phipps
Jenna Phipps is a contributor for websites such as and Enterprise Storage Forum. She writes about information technology security, networking, and data storage. Jenna lives in Nashville, TN.

Top Articles

The Complete List of 1500+ Common Text Abbreviations & Acronyms

Text Abbreviations reviewed by Web Webster   From A3 to ZZZ we list 1,559 SMS, online chat, and text abbreviations to help you translate and understand...

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... is a cloud-based work operating system that can be used for a...

Secure Socket Tunneling Protocol...

The secure socket tunneling protocol (SSTP) is a VPN protocol where...


Telecommunication refers to telephony and cellular network technology. However, the broader definition includes...