Written by the Fiveable Content Team โข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated September 2025
Definition
Sorting algorithms are techniques used to arrange elements in a specific order (e.g., ascending or descending) within a collection of data.
Related terms
Bubble Sort: A simple sorting algorithm that repeatedly compares adjacent elements and swaps them if they are in the wrong order.
Quick Sort: A divide-and-conquer sorting algorithm that selects a pivot element and partitions the array into two subarrays, then recursively sorts each subarray.