In insertion sort, a sorted subarray refers to the portion of the array that has already been sorted. As new elements are inserted into their correct positions within this subarray, it expands until all elements are eventually sorted.
Related terms
Unsorted Subarray: The portion of an array that has not yet been sorted during an iteration of insertion sort.
Partially Sorted Array: An array where some portions have been correctly ordered but others may still need sorting.
Stable Sorting Algorithm: A sorting algorithm that maintains the relative order of equal elements after sorting.