-
Insertion Sort:
Builds the sorted array one item at a time by repeatedly inserting the next element into its correct position among the already sorted elements.
-
Bubble Sort:
Repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. This process is repeated until the list is sorted.
-
Selection Sort:
Finds the minimum element from the unsorted part and swaps it with the first unsorted element, moving the boundary of the sorted part one step forward.
-
Merge Sort:
Divides the array into halves, recursively sorts each half, and then merges the sorted halves to produce the sorted array.
-
Quick Sort:
Selects a 'pivot' element, partitions the array into elements less than and greater than the pivot, and recursively sorts the partitions.
-
Heap Sort:
Builds a heap from the array, then repeatedly extracts the maximum element from the heap and places it at the end of the array, sorting the array in place.